We recently upgraded our DHIS2 from 2.39 to 2.41.0, and would like to use the Android capture app to version 3.0.1.
I installed the Android Capture Training APK from github, and when I open “Configuration troubleshooting”, to validate our program rules, we see many errors displayed, most of them indicating “Rule Action: Condition is empty” or “Failed to coerce value (Variable xxx) to Date”.
For debugging purposes, I tried the same thing using DHIS2 Play environments (2.39 and 2.41) and I see that the same kind of error is displayed in the configuration troubleshooting for many programs.
Are you aware of something that broke “Program rules Valiation” when using the Android Capture 3.0.1 version?
Would you know if we should update somthing in our program rules, or just wait for a patch to solve these issues?
we have noticed that the Android app is excessively verbose in those errors and sometimes it displays warnings as errors. That is something we will improve not to have false positives.
It is hard to tell if you need to update something in your program rules, my feeling is that the program rules are probably be working fine if you have not noticed anything wrong. I would recommend to double check the program rules, but do not update anything unless you find something wrong.
Sorry for this, we will try to reduce the noise in those logs.
Many thanks for taking the time to answer my question.
The Android App seems to see the program rule condition as empty (for RMNCAH program in Play environment) for Check Mobile Number program rule, but the program rule condition is defined with the expression:
d2:validatePattern(A{mobile} ,‘.555.’).
And indeed, even though we have a message in the Program rules troubleshooting saying that the condition is emply, the program rule action is triggered when I type in a number containing 555.
So it seems we can ignore those error messages for “Condition is empty”.
I also tried to see if the program rule “Calculate gestational age from LMP” is working, although the message “Failed to coerce value …” is displayed.
I confirm the program rule action seems also to be working ok.
So you are probably right and I guess we can ignore those messages.
Thanks