dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24866
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12233: Event analytics, fixed bug with in query operator
------------------------------------------------------------
revno: 12233
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-25 11:18:11 +0200
message:
Event analytics, fixed bug with in query operator
modified:
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/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/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2013-09-11 20:04:18 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2013-09-25 09:18:11 +0000
@@ -211,7 +211,7 @@
{
params.getItems().add( new QueryItem( getItem( it, pr ) ) );
}
- else if ( it != null )
+ else if ( it != null ) // Filter
{
String[] split = it.split( OPTION_SEP );
=== 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 2013-09-11 20:04:18 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java 2013-09-25 09:18:11 +0000
@@ -219,19 +219,20 @@
return null;
}
- filter = statementBuilder.encode( filter, false );
+ operator = operator.toLowerCase();
+ filter = statementBuilder.encode( filter, false ).toLowerCase();
if ( operator.equals( "like" ) )
{
- return "'%" + filter.toLowerCase() + "%'";
+ return "'%" + filter + "%'";
}
else if ( operator.equals( "in" ) )
{
- String[] split = filter.toLowerCase().split( ":" );
+ String[] split = filter.split( ":" );
return "(" + TextUtils.getQuotedCommaDelimitedString( Arrays.asList( split ) ) + ")";
}
- return "'" + filter.toLowerCase() + "'";
+ return "'" + filter + "'";
}
}