← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9090: Fixed bug in periodType.js leading to wrong periods in data set report

 

------------------------------------------------------------
revno: 9090
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-11-20 18:44:12 +0100
message:
  Fixed bug in periodType.js leading to wrong periods in data set report
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js	2012-10-24 12:52:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js	2012-11-20 17:44:12 +0000
@@ -275,7 +275,7 @@
             period['endDate'] = endDate.format( dateFormat );
             period['name'] = startDate.date().getFullYear();
             period['id'] = 'Yearly_' + period['startDate'];
-            period['iso'] = year;
+            period['iso'] = startDate.date().getFullYear();
             periods[i] = period;
 
             startDate.adjust( 'Y', +1 );
@@ -302,7 +302,7 @@
             period['endDate'] = endDate.format( dateFormat );
             period['name'] =  monthNames[9] + ' ' +  startDate.date().getFullYear() + '-' + monthNames[8] + ' ' + (startDate.date().getFullYear() +1 );
             period['id'] = 'FinancialOct_' + period['startDate'];
-            period['iso'] = year + 'Oct';
+            period['iso'] = startDate.date().getFullYear() + 'Oct';
             periods[i] = period;
 
             startDate.adjust( 'Y', +1 );
@@ -329,7 +329,7 @@
             period['endDate'] = endDate.format( dateFormat );
             period['name'] =  monthNames[6] + ' ' +  startDate.date().getFullYear() + '-' + monthNames[5] + ' ' + (startDate.date().getFullYear() +1 );
             period['id'] = 'FinancialJuly_' + period['startDate'];
-            period['iso'] = year + 'July';
+            period['iso'] = startDate.date().getFullYear() + 'July';
             periods[i] = period;
 
             startDate.adjust( 'Y', +1 );
@@ -356,7 +356,7 @@
             period['endDate'] = endDate.format( dateFormat );
             period['name'] =  monthNames[3] + ' ' +  startDate.date().getFullYear() + '-' + monthNames[2] + ' ' + (startDate.date().getFullYear() +1 );
             period['id'] = 'FinancialApril_' + period['startDate'];
-            period['iso'] = year + 'April';
+            period['iso'] = startDate.date().getFullYear() + 'April';
             periods[i] = period;
 
             startDate.adjust( 'Y', +1 );