dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31680
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16181: bugfix, serialize periodType down to just periodType.getName in fieldFilterService, will be repla...
------------------------------------------------------------
revno: 16181
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-07-18 20:33:31 +0700
message:
bugfix, serialize periodType down to just periodType.getName in fieldFilterService, will be replaced by proper fix in 2.17
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.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/fieldfilter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java 2014-07-18 13:32:19 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java 2014-07-18 13:33:31 +0000
@@ -285,6 +285,13 @@
if ( child != null )
{
child.setName( fieldKey );
+
+ // TODO fix ugly hack, will be replaced by custom field serializer/deserializer
+ if ( child.isSimple() && PeriodType.class.isInstance( (((SimpleNode) child).getValue()) ) )
+ {
+ child = new SimpleNode( child.getName(), ((PeriodType) ((SimpleNode) child).getValue()).getName() );
+ }
+
complexNode.addChild( fieldValue.getPipeline().process( child ) );
}
}