=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryParser.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryParser.java 2015-11-06 08:31:07 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryParser.java 2015-11-11 06:19:50 +0000 @@ -76,6 +76,23 @@ private Restriction getRestriction( Schema schema, String path, String operator, Object arg ) throws QueryParserException { + // optimize if not translated + if ( !schema.isTranslated() ) + { + if ( path.startsWith( "displayName:" ) && schema.havePersistedProperty( "name" ) ) + { + path = path.replace( "displayName:", "name:" ); + } + else if ( path.startsWith( "displayShortName:" ) && schema.havePersistedProperty( "shortName" ) ) + { + path = path.replace( "displayShortName:", "shortName:" ); + } + else if ( path.startsWith( "displayDescription:" ) && schema.havePersistedProperty( "description" ) ) + { + path = path.replace( "displayDescription:", "description:" ); + } + } + Property property = getProperty( schema, path ); if ( property == null )