← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2399: exporting explicit periods. we don't want to exchange period id metadata

 

------------------------------------------------------------
revno: 2399
committer: Bob Joliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2010-12-20 12:58:00 +0000
message:
  exporting explicit periods.  we don't want to exchange period id metadata
  
  ------------- -This line and the following will be ignored --------------
  
  modified:
    dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.java
modified:
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.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-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.java	2010-12-19 00:24:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.java	2010-12-20 12:58:00 +0000
@@ -69,8 +69,6 @@
     {
         Writer writer = new BufferedWriter(new OutputStreamWriter(out));
 
-        // out.write("Hello World\n".getBytes());
-
         Collection<Period> periods 
             = periodService.getIntersectingPeriodsByPeriodType( new MonthlyPeriodType(), startDate, endDate );
 
@@ -110,7 +108,10 @@
         while (adv != null)
         {
             // process adv ..
-            writer.write( adv.getPeriodId() + ",");
+            int periodId = adv.getPeriodId();
+            String period = periodService.getPeriod( periodId).getIsoDate();
+
+            writer.write( period + ",");
             writer.write( adv.getOrganisationUnitId() + ",");
             writer.write( adv.getDataElementId() + ",");
             writer.write( adv.getCategoryOptionComboId() + ",");