dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33715
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17266: Approval, fixed bug, must check category optiong group inside group set
------------------------------------------------------------
revno: 17266
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-10-24 14:29:07 +0200
message:
Approval, fixed bug, must check category optiong group inside group set
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalService.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/DefaultDataApprovalLevelService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2014-10-24 12:25:34 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2014-10-24 12:29:07 +0000
@@ -755,6 +755,6 @@
&& CollectionUtils.isEmpty( userCredentials.getCatDimensionConstraints() );
}
- return !CollectionUtils.isEmpty( categoryService.getAllCategoryOptionGroups() );
+ return !CollectionUtils.isEmpty( categoryService.getCategoryOptionGroups( cogs ) );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalService.java 2014-10-24 12:25:34 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalService.java 2014-10-24 12:29:07 +0000
@@ -394,10 +394,10 @@
int dataLevel = da.getDataApprovalLevel() == null ? maxApprovalLevel + 1 : da.getDataApprovalLevel().getLevel();
boolean mayApprove = ( authorizedToApprove && userLevel == dataLevel && !da.isAccepted() ) ||
- authorizedToApproveAtLowerLevels && userLevel < dataLevel;
+ authorizedToApproveAtLowerLevels && userLevel < dataLevel;
boolean mayAcceptOrUnaccept = authorizedToAcceptAtLowerLevels && dataLevel <= maxApprovalLevel &&
- ( userLevel == dataLevel + 1 || ( userLevel < dataLevel && authorizedToApproveAtLowerLevels ) );
+ ( userLevel == dataLevel + 1 || ( userLevel < dataLevel && authorizedToApproveAtLowerLevels ) );
boolean mayUnapprove = mayApprove && ( !da.isAccepted() || mayAcceptOrUnaccept );