OpenClinica / enketo-oc

OpenClinica's fork of the Enketo web forms monorepo
Apache License 2.0
0 stars 1 forks source link

no relevant error shown upon load for default values #141

Open MartijnR opened 3 years ago

MartijnR commented 3 years ago

@pbowen-oc wrote:

I'm seeing a broader issue where some non-relevant items with values are not being displayed.

Similar to the original issue, on this form - repeat set value test2.xml.txt - when I first open it, the bp_pos item is being defaulted to "Standing" and submitted, but the repeating group is not displayed. The repeating group is still not displayed if I reopen the form even though this item has a value.

Opening and closing that form without taking any action brings up this error since it still seems to know that the "Standing" item is in a non-relevant item: Screenshot 2020-12-18 234007

Also, on that same form, adding several repeats and entering data into them and then selecting No for the first item causes the entire repeating group to be hidden (when a relevant error is expected).

Also, on my standard old form (without any of the dynamic defaults or set values added), if I enter Height, Weight, and H/W Units and then uncheck the box to to indicate Height and Weight not collected, I see the relevant error on these items as expected (they are relevant individually). However, if I close the form and reopen it, that section is not displayed even though those items have values from the instance and still have them if I check the box to show those items again.

_Originally posted by @pbowen-oc in https://github.com/OpenClinica/enketo-oc/issues/111

MartijnR commented 3 years ago

http://localhost:8005/single/fs/i/upAlb3XP?ecid=1

I believe the issue is that branches that have never been enabled are not processed when they are found to be non-relevant.

Fixing this likely has a strong adverse affect on loading performance for some forms.