dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29501
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14921: Event analytics, fixed bug which occured for repeating dimensions
------------------------------------------------------------
revno: 14921
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-04-20 22:56:55 +0200
message:
Event analytics, fixed bug which occured for repeating dimensions
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.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/EventQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java 2014-03-26 09:25:45 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java 2014-04-20 20:56:55 +0000
@@ -146,9 +146,8 @@
for ( QueryItem item : items )
{
- if ( !existingObjects.contains( item.getItem() ) )
+ if ( existingObjects.add( item.getItem() ) )
{
- existingObjects.add( item.getItem() );
uniqueItems.add( item );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java 2014-04-19 10:55:51 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java 2014-04-20 20:56:55 +0000
@@ -162,7 +162,7 @@
grid.addValue( dimensionValue );
}
- for ( QueryItem queryItem : params.getItems() )
+ for ( QueryItem queryItem : params.getUniqueItems() )
{
String itemValue = rowSet.getString( queryItem.getItem().getUid() );
grid.addValue( itemValue );
@@ -311,7 +311,7 @@
{
sql += statementBuilder.columnQuote( dimension.getDimensionName() ) + ",";
}
-
+
for ( QueryItem queryItem : params.getUniqueItems() )
{
IdentifiableObject item = queryItem.getItem();