You are over-interpreting the study. The difference in productivity was for the task of adding five two digit numbers. This is a simple task very different from software development. The paper presents no evidence that effects on performance on this task is indicative of performance on other tasks.
Also, this experiment investigated short term happiness shocks, not long term general happiness levels. When the happiness shock was in the form of food, performance increased 15%.