Hi Devs,

I’m finding that a number of program rules aren’t firing in 2.26 – this is 
happening with both Event Capture and Tracker Capture.

This includes the sample ‘Hide Program Stage’ rule which has been added to the 
WHO RMNCH Tracker for the 2.26 release.  To reproduce in Play demo:

1.       add a new registration to the WHO RMNCH Tracker with date 2017-01-01

2.       complete the initial visit, and click ‘cancel’ to prevent creation of 
a second antenatal care visit

3.       click ‘+’ to create a ‘Care at birth’ event on 2017-02-01

4.       for WHOMCH pregnancy outcome, select ‘Stillbirth’, and complete the 
event.
The rule which should hide the postnatal program stage has not fired.  In the 
browser console, the following two errors are recorded are:

·         Expression #{currentProgranancyOutcome}  != 'Live birth' contains 
variable currentProgranancyOutcome - but this variable is not defined.

·         Expression with id rule:xOm49QX4Nsc could not be run. Original 
condition was: #{currentProgranancyOutcome}  != 'Live birth' - Evaluation ended 
up as:#{currentProgranancyOutcome}  != 'Live birth' - error 
message:SyntaxError: Invalid or unexpected token

The important error seems to be the second one, as in many cases this is 
appearing in isolation (without the first one), and is still breaking program 
rules.  For example, I’ve loaded the Cameroon EquityTool into the Play Demo 
instance, and any attempt to enter new Event Capture events for this program 
keeps generating similar error messages in the browser console, eg:

·         Expression with id rule:gXwzJFfRn5m could not be run. Original 
condition was: #{EQT-CM11Q06a} + #{EQT-CM11Q06b} >1 - Evaluation ended up 
as:#{EQT-CM11Q06a} + #{EQT-CM11Q06b} >1 - error message:SyntaxError: Invalid or 
unexpected token
These program rules have been extensively tested on earlier releases, and 
worked well – where users used to be prevented from entering invalid surveys, 
they can now save invalid surveys.

This is very serious, as it means that in 2.26, users can now bypass many 
program rules, and save incomplete or incorrect data.  But I’m also aware that 
there have recently been build issues with 2.25 and 2.26 releases – before I 
log a bug on Jira, could this be related to those build issues?

Regards, Sam.

_______________________________________________
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

Reply via email to