dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38118
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19461: properly clear out optionset on TEA updates
------------------------------------------------------------
revno: 19461
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-06-19 13:20:43 +0700
message:
properly clear out optionset on TEA updates
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.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-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java 2015-06-10 10:20:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java 2015-06-19 06:20:43 +0000
@@ -207,20 +207,22 @@
trackedEntityAttribute.setValueType( valueType );
trackedEntityAttribute.setExpression( expression );
trackedEntityAttribute.setDisplayOnVisitSchedule( false );
+ trackedEntityAttribute.setOptionSet( null );
- unique = (unique == null) ? false : true;
+ unique = (unique != null);
trackedEntityAttribute.setUnique( unique );
- inherit = (inherit == null) ? false : true;
+ inherit = (inherit != null);
trackedEntityAttribute.setInherit( inherit );
- confidential = (confidential == null) ? false : true;
+ confidential = (confidential != null);
trackedEntityAttribute.setConfidential( confidential );
if ( unique )
{
boolean orgunitScope = false;
boolean programScope = false;
+
if ( scope != null && (scope == SCOPE_ORGUNIT || scope == SCOPE_PROGRAM_IN_ORGUNIT) )
{
orgunitScope = true;