dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36520
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18676: Approval, patch from Jim, constrain query by attributeoptioncombo
------------------------------------------------------------
revno: 18676
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-03-24 16:51:29 +0100
message:
Approval, patch from Jim, constrain query by attributeoptioncombo
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.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-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java 2015-03-23 17:01:34 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java 2015-03-24 15:51:29 +0000
@@ -371,6 +371,7 @@
"left join _orgunitstructure ous on ous.idlevel" + orgUnitLevel + " = o.organisationunitid and ous.organisationunitid = coo.organisationunitid " +
joinAncestors +
"where ( coo.categoryoptionid is null or ous.organisationunitid is not null " + testAncestors + ")" +
+ ( attributeOptionCombo == null ? "" : " and cocco.categoryoptioncomboid = " + attributeOptionCombo.getId() ) +
( isSuperUser || user == null ? "" :
" and ( co.publicaccess is null or left(co.publicaccess, 1) = 'r' or co.userid = " + user.getId() + " or exists ( " +
"select 1 from dataelementcategoryoptionusergroupaccesses couga " +