dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10119
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2771: Fixed bug, removing default catogory option combo name from validation result details. Using cent...
------------------------------------------------------------
revno: 2771
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-01-27 18:41:50 +0100
message:
Fixed bug, removing default catogory option combo name from validation result details. Using centralized method
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationResultDetailsAction.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-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java 2011-01-25 22:38:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java 2011-01-27 17:41:50 +0000
@@ -207,7 +207,7 @@
* @param categoryOptionCombo the category option combo.
* @return the name.
*/
- public String getPrettyName( DataElement dataElement, DataElementCategoryOptionCombo categoryOptionCombo )
+ public static String getPrettyName( DataElement dataElement, DataElementCategoryOptionCombo categoryOptionCombo )
{
if ( dataElement == null ) // Invalid
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java 2010-12-07 17:02:27 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java 2011-01-27 17:41:50 +0000
@@ -322,7 +322,7 @@
+ operand.getOptionComboId() );
}
- match = operand.getPrettyName( dataElement, categoryOptionCombo );
+ match = DataElementOperand.getPrettyName( dataElement, categoryOptionCombo );
matcher.appendReplacement( buffer, match );
}
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationResultDetailsAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationResultDetailsAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationResultDetailsAction.java 2011-01-27 17:41:50 +0000
@@ -182,8 +182,7 @@
String value = dataValue != null ? dataValue.getValue() : NULL_REPLACEMENT;
- leftSideMap.put( dataElement.getName() + " " +
- categoryOptionCombo.getName(), value );
+ leftSideMap.put( DataElementOperand.getPrettyName( dataElement, categoryOptionCombo ), value );
}
for ( DataElementOperand operand : expressionService.getOperandsInExpression( validationRule.getRightSide().getExpression() ) )
@@ -196,8 +195,7 @@
String value = dataValue != null ? dataValue.getValue() : NULL_REPLACEMENT;
- rightSideMap.put( dataElement.getName() + " " +
- categoryOptionCombo.getName(), value );
+ rightSideMap.put( DataElementOperand.getPrettyName( dataElement, categoryOptionCombo ), value );
}
return SUCCESS;