=== 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() ) {