Open pbowen-oc opened 2 years ago
@MartijnR - We had another example of this reported.
In this form - Relevant Calc Repeat Group2.xform.txt - the calculations on the second repeating group don't trigger for rows greater than one (as in the original form above). In this case, there is a separate repeating group on the form. When a new repeat is added to this other group, than all pending calculations in the other group immediately process.
first form: http://localhost:8005/single/fs/i/2wnm6qY3?ecid=1
issue is present in master of enketo-express-oc as well
Looks like this might have multiple causes.
One cause is the _updateCalc overwrite in this fork. When disabling that overwrite the 3 calculations are performed when the first Show Note is set to Yes, regardless of whether the others are relevant.
When calc update is called with:
No nodes are found to update. The bug probably has to do with the the relative relevant path in "../shownote = 'Yes'"
.
The issue can be reproduced only if a) the calculation is separate (and not a readonly text input), and the calculate doesn't refer directly to the node that changes the relevancy (e.g just "1+1"
will do)
There is something tricky about the form. Cannot reproduce with this:
Found in 2.5.6.oc-16
Steps:
Expected: The note for each repeat shows the calculation value: 'abc' for the first repeat and 'def' for the second and third repeats.
Actual: The note displays the calculation value as expected for the first repeat, but it is blank for the second and third repeats. The calculation is not submitted for those repeats.
Note: Reopening the form with the second or third radio buttons already selected causes the calculations to display as expected in the form editing session.