dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34881
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17895: fix for parseObjectFilter, instead of just taking component 3 of split, use evertyhing after the ...
------------------------------------------------------------
revno: 17895
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-01-07 09:04:26 +0700
message:
fix for parseObjectFilter, instead of just taking component 3 of split, use evertyhing after the two first split components, this allows for having : in filters
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.java 2014-07-12 12:52:17 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.java 2015-01-07 02:04:26 +0000
@@ -28,13 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.List;
-
+import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.dxf2.fieldfilter.FieldMap;
import org.hisp.dhis.dxf2.objectfilter.Filters;
-import com.google.common.collect.Lists;
+import java.util.List;
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -57,7 +56,8 @@
if ( split.length >= 3 )
{
- parsed.addFilter( split[0], split[1], split[2] );
+ int index = split[0].length() + ":".length() + split[1].length() + ":".length();
+ parsed.addFilter( split[0], split[1], filter.substring( index ) );
}
else
{