dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08275
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1968: r2036 from 2.0.5. Improved backwards compatibility for period import
------------------------------------------------------------
revno: 1968
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-10-29 16:40:59 +0200
message:
r2036 from 2.0.5. Improved backwards compatibility for period import
modified:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.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/dxf/converter/ChartConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java 2010-07-30 12:59:39 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java 2010-10-29 14:40:59 +0000
@@ -243,7 +243,9 @@
chart.getRelatives().setIndividualMonthsThisYear( Boolean.parseBoolean( reader.getElementValue() ) );
reader.moveToStartElement( FIELD_INDIVIDUAL_QUARTERS_THIS_YEAR );
- chart.getRelatives().setIndividualQuartersThisYear( Boolean.parseBoolean( reader.getElementValue() ) );
+ chart.getRelatives().setIndividualQuartersThisYear( Boolean.parseBoolean( reader.getElementValue() ) );
+
+ importObject( chart, params );
}
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.java 2010-07-30 12:59:39 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.java 2010-10-29 14:40:59 +0000
@@ -134,6 +134,11 @@
PeriodType periodType = new MonthlyPeriodType();
period.setPeriodType( periodType );
+ if ( values.get( FIELD_PERIOD_TYPE ) != null && values.get( FIELD_PERIOD_TYPE ).equalsIgnoreCase( "relative" ) )
+ {
+ continue; // Backwards compatibility
+ }
+
period.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
period.getPeriodType().setId( periodTypeMapping.get( values.get( FIELD_PERIOD_TYPE ) ) );
period.setStartDate( DateUtils.getMediumDate( values.get( FIELD_START_DATE ) ) );