← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12293: Event analytics, modified filter format for consistency

 

------------------------------------------------------------
revno: 12293
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-09-28 15:59:45 +0200
message:
  Event analytics, modified filter format for consistency
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js


--
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-28 12:37:06 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2013-09-28 13:59:45 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.analytics.DataQueryParams.OPTION_SEP;
-import static org.hisp.dhis.common.DimensionalObject.*;
+import static org.hisp.dhis.analytics.DataQueryParams.DIMENSION_NAME_SEP;
+import static org.hisp.dhis.common.DimensionalObject.ORGUNIT_DIM_ID;
+import static org.hisp.dhis.common.DimensionalObject.PERIOD_DIM_ID;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -263,13 +264,13 @@
         {
             for ( String it : item )
             {
-                if ( it != null && !it.contains( OPTION_SEP ) )
+                if ( !it.contains( DIMENSION_NAME_SEP ) )
                 {
                     params.getItems().add( getItem( pr, it, null, null ) );
                 }
-                else if ( it != null ) // Filter
+                else // Filter
                 {
-                    String[] split = it.split( OPTION_SEP );
+                    String[] split = it.split( DIMENSION_NAME_SEP );
                     
                     if ( split == null || split.length != 3 )
                     {
@@ -299,7 +300,7 @@
         
         if ( ou != null )
         {
-            String[] split = ou.split( OPTION_SEP );
+            String[] split = ou.split( DIMENSION_NAME_SEP );
             
             for ( String ouId : split )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-09-25 07:00:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-09-28 13:59:45 +0000
@@ -1899,7 +1899,7 @@
 				for( var i in TR.state.orgunitIds){
 					p.ou += TR.state.orgunitIds[i];
 					if( i<TR.state.orgunitIds.length - 1 ){
-						p.ou +=";"
+						p.ou +=":"
 					}
 				}
 				if( Ext.getCmp('userOrgunit').getValue() == "true" ){
@@ -1937,10 +1937,10 @@
 							&& Ext.getCmp('filter_' + id).getValue()!=''){
 							
 							filterValue = filterValue.toLowerCase();
-							filter += ';' + filterOpt + ';';
+							filter += ':' + filterOpt + ':';
 							if( filterOpt == 'IN' )
 							{
-								filter +=filterValue.replace(/;/g,":"); 
+								filter +=filterValue.replace(/:/g,";"); 
 							}
 							else
 							{