------------------------------------------------------------ revno: 12380 committer: Tran Chau <tran.hispviet...@gmail.com> branch nick: dhis2 timestamp: Wed 2013-10-02 18:21:46 +0700 message: Fixed bug - Don't save values of attributes with pre-defined values. modified: dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.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-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java 2013-09-19 06:06:15 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java 2013-10-02 11:21:46 +0000 @@ -311,7 +311,8 @@ attributeValue = new PatientAttributeValue(); attributeValue.setPatient( patient ); attributeValue.setPatientAttribute( attribute ); - + attributeValue.setValue(value); + if ( PatientAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) ) { PatientAttributeOption option = patientAttributeOptionService @@ -319,7 +320,6 @@ if ( option != null ) { attributeValue.setPatientAttributeOption( option ); - attributeValue.setValue( option.getName() ); } else { === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java 2013-09-19 06:06:15 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java 2013-10-02 11:21:46 +0000 @@ -292,12 +292,12 @@ if ( option != null ) { attributeValue.setPatientAttributeOption( option ); - attributeValue.setValue( option.getName() ); } else { // This option was deleted ??? } + attributeValue.setValue( value ); } else {
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp