dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33015
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16800: Event analytics, fix for relative last month/period
------------------------------------------------------------
revno: 16800
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-09-24 15:47:50 +0200
message:
Event analytics, fix for relative last month/period
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java
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/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2014-09-22 15:30:14 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2014-09-24 13:47:50 +0000
@@ -861,8 +861,7 @@
List<NameableObject> dataSets = new ArrayList<>();
List<NameableObject> operandDataElements = new ArrayList<>();
- options:
- for ( String uid : items )
+ options: for ( String uid : items )
{
Indicator in = indicatorService.getIndicator( uid );
@@ -944,7 +943,8 @@
if ( RelativePeriodEnum.contains( isoPeriod ) )
{
RelativePeriodEnum relativePeriod = RelativePeriodEnum.valueOf( isoPeriod );
- periods.addAll( RelativePeriods.getRelativePeriodsFromEnum( relativePeriod, relativePeriodDate, format, true ) );
+ List<Period> relativePeriods = RelativePeriods.getRelativePeriodsFromEnum( relativePeriod, relativePeriodDate, format, true );
+ periods.addAll( relativePeriods );
}
else
{
=== 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 2014-08-25 12:20:56 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2014-09-24 13:47:50 +0000
@@ -334,8 +334,6 @@
{
EventQueryParams params = new EventQueryParams();
- Date date = new Date();
-
Program pr = programService.getProgram( program );
if ( pr == null )
@@ -372,7 +370,7 @@
{
String dimensionId = getDimensionFromParam( dim );
List<String> items = getDimensionItemsFromParam( dim );
- List<DimensionalObject> dimObj = analyticsService.getDimension( dimensionId, items, date, format, true );
+ List<DimensionalObject> dimObj = analyticsService.getDimension( dimensionId, items, null, format, true );
if ( dimObj != null )
{
@@ -391,7 +389,7 @@
{
String dimensionId = getDimensionFromParam( dim );
List<String> items = getDimensionItemsFromParam( dim );
- List<DimensionalObject> dimObj = analyticsService.getDimension( dimensionId, items, date, format, true );
+ List<DimensionalObject> dimObj = analyticsService.getDimension( dimensionId, items, null, format, true );
if ( dimObj != null )
{