dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36857
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18842: Event analytics, including value dimension in meta data
------------------------------------------------------------
revno: 18842
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-04-09 11:02:42 +0200
message:
Event analytics, including value dimension in meta data
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.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-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2015-03-31 10:38:02 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2015-04-09 09:02:42 +0000
@@ -605,12 +605,17 @@
}
}
+ if ( params.hasValueDimension() )
+ {
+ map.put( params.getValue().getUid(), NameableObjectUtils.getProperty( params.getValue(), params.getDisplayProperty() ) );
+ }
+
map.putAll( getUidNameMap( params.getItems(), params.getDisplayProperty() ) );
map.putAll( getUidNameMap( params.getItemFilters(), params.getDisplayProperty() ) );
map.putAll( getUidNameMap( params.getDimensions(), params.isHierarchyMeta(), params.getDisplayProperty() ) );
map.putAll( getUidNameMap( params.getFilters(), params.isHierarchyMeta(), params.getDisplayProperty() ) );
map.putAll( IdentifiableObjectUtils.getUidNameMap( params.getLegends() ) );
-
+
return map;
}
@@ -620,14 +625,7 @@
for ( QueryItem item : queryItems )
{
- if ( DisplayProperty.SHORTNAME.equals( displayProperty ) )
- {
- map.put( item.getItem().getUid(), item.getItem().getDisplayShortName() );
- }
- else
- {
- map.put( item.getItem().getUid(), item.getItem().getDisplayName() );
- }
+ map.put( item.getItem().getUid(), NameableObjectUtils.getProperty( item.getItem(), displayProperty ) );
}
return map;
@@ -662,14 +660,7 @@
}
}
- if ( dimension.getDisplayShortName() != null && DisplayProperty.SHORTNAME.equals( displayProperty ) )
- {
- map.put( dimension.getDimension(), dimension.getDisplayShortName() );
- }
- else if ( dimension.getDisplayName() != null ) // NAME
- {
- map.put( dimension.getDimension(), dimension.getDisplayName() );
- }
+ map.put( dimension.getDimension(), NameableObjectUtils.getProperty( dimension, displayProperty ) );
}
return map;