← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2870: Fixed #721154: Data browser periods display properly.Thanks Hieu.

 

------------------------------------------------------------
revno: 2870
committer: Jason P. Pickering <jason.p.pickering@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-02-18 14:21:57 +0200
message:
  Fixed #721154: Data browser periods display properly.Thanks Hieu.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/SearchAction.java


--
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-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/SearchAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/SearchAction.java	2011-02-16 13:25:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/SearchAction.java	2011-02-18 12:21:57 +0000
@@ -551,12 +551,14 @@
     private void convertColumnNames( DataBrowserTable dataBrowserTable )
     {
         allColumnsConverted = dataBrowserTable.getColumns();
-        PeriodType monthlyPeriodType = periodService.getPeriodTypeByName( MonthlyPeriodType.NAME );
+
+        PeriodType periodType = periodService.getPeriodTypeByName( periodTypeId );
 
         for ( MetaValue col : allColumnsConverted )
-        {
-            col.setName( dataBrowserService.convertDate( monthlyPeriodType, col.getName(), format ) );
-        }
+            {
+                   col.setName( dataBrowserService.convertDate( periodType, col.getName(), format ) );
+            }
     }
 
+
 }