← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14745: TEI query, validation

 

------------------------------------------------------------
revno: 14745
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-04-08 16:57:15 +0200
message:
  TEI query, validation
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.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-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-04-08 14:44:25 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-04-08 14:57:15 +0000
@@ -173,7 +173,8 @@
         
         // ---------------------------------------------------------------------
         // If params of type query and no attributes or filters defined, use
-        // attributes from program if exists, if not, use all attributes.
+        // attributes from program if exists, if not, use display-in-list 
+        // attributes.
         // ---------------------------------------------------------------------
 
         if ( !params.hasAttributesOrFilters() )
@@ -293,6 +294,11 @@
         {
             violation = "Program must be defined when program dates are specified";
         }
+
+        if ( params.isOrQuery() && params.hasFilters() )
+        {
+            violation = "Query cannot be specified together with filters";
+        }
         
         if ( !params.getDuplicateAttributes().isEmpty() )
         {