dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31829
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16252: CSV import, validation rules, including null if blank for expressions
------------------------------------------------------------
revno: 16252
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-07-27 14:20:33 +0200
message:
CSV import, validation rules, including null if blank for expressions
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java 2014-07-17 14:36:40 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java 2014-07-27 12:20:33 +0000
@@ -258,12 +258,14 @@
leftSide.setExpression( getSafe( values, 9, null, 255 ) );
leftSide.setDescription( getSafe( values, 10, null, 255 ) );
+ leftSide.setNullIfBlank( Boolean.valueOf( getSafe( values, 11, Boolean.FALSE.toString(), 5 ) ) );
leftSide.setDataElementsInExpression( expressionService.getDataElementsInExpression( leftSide.getExpression() ) );
leftSide.setOptionCombosInExpression( expressionService.getOptionCombosInExpression( leftSide.getExpression() ) );
leftSide.setNullIfBlank( true );
- rightSide.setExpression( getSafe( values, 11, null, 255 ) );
- rightSide.setDescription( getSafe( values, 12, null, 255 ) );
+ rightSide.setExpression( getSafe( values, 12, null, 255 ) );
+ rightSide.setDescription( getSafe( values, 13, null, 255 ) );
+ rightSide.setNullIfBlank( Boolean.valueOf( getSafe( values, 14, Boolean.FALSE.toString(), 5 ) ) );
rightSide.setDataElementsInExpression( expressionService.getDataElementsInExpression( rightSide.getExpression() ) );
rightSide.setOptionCombosInExpression( expressionService.getOptionCombosInExpression( rightSide.getExpression() ) );
rightSide.setNullIfBlank( true );