dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19071
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8176: Custom forms, does not require all data element category options in indicator formulas to be pres...
------------------------------------------------------------
revno: 8176
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-09-21 10:32:59 +0200
message:
Custom forms, does not require all data element category options in indicator formulas to be present in the form anymore, subsitutes missing values with 0
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ValidateIndicatorGroupAction.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-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2012-09-18 09:17:06 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2012-09-21 08:32:59 +0000
@@ -96,16 +96,14 @@
var fieldId = '#' + dataElementId + '-' + categoryOptionComboId + '-val';
+ var value = '0';
+
if ( $( fieldId ).length )
{
- var value = $( fieldId ).val() ? $( fieldId ).val() : '0';
+ value = $( fieldId ).val() ? $( fieldId ).val() : '0';
+ }
- expression = expression.replace( match, value );
- }
- else // Return null if data element / category option combo not in form
- {
- return null;
- }
+ expression = expression.replace( match, value );
// TODO signed numbers
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ValidateIndicatorGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ValidateIndicatorGroupAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ValidateIndicatorGroupAction.java 2012-09-21 08:32:59 +0000
@@ -96,7 +96,6 @@
{
if ( name != null )
{
-
IndicatorGroup match = indicatorService.getIndicatorGroupByName( name );
if ( match != null && (id == null || match.getId() != id) )