← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10681: Fixed bug related to saving of crosstab dimensions for report tables

 

------------------------------------------------------------
revno: 10681
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-04-24 13:44:29 +0200
message:
  Fixed bug related to saving of crosstab dimensions for report tables
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.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-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2013-03-19 17:09:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2013-04-24 11:44:29 +0000
@@ -937,9 +937,10 @@
 
     public void setDoIndicators( boolean doIndicators )
     {
+        this.columnDimensions.remove( DATA_X_DIM_ID );
+        
         if ( doIndicators )
         {
-            this.columnDimensions.remove( DATA_X_DIM_ID );
             this.columnDimensions.add( DATA_X_DIM_ID );
         }
     }
@@ -951,9 +952,10 @@
 
     public void setDoPeriods( boolean doPeriods )
     {
+        this.columnDimensions.remove( PERIOD_DIM_ID );
+        
         if ( doPeriods )
         {
-            this.columnDimensions.remove( PERIOD_DIM_ID );
             this.columnDimensions.add( PERIOD_DIM_ID );
         }
     }
@@ -965,9 +967,10 @@
     
     public void setDoUnits( boolean doUnits )
     {
+        this.columnDimensions.remove( ORGUNIT_DIM_ID );
+        
         if ( doUnits )
         {
-            this.columnDimensions.remove( ORGUNIT_DIM_ID );
             this.columnDimensions.add( ORGUNIT_DIM_ID );
         }
     }