-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Items nested in group do not reflect in questionnaire-response with skip logic #1972
Comments
maimoonak
changed the title
Items nested in group do not reflect in questionnaire-response with slip logic
Items nested in group do not reflect in questionnaire-response with skip logic
Apr 13, 2023
7 tasks
#1973 the PR has the fix for issue, however, it is failing one of the test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Item which are in group / repeat group are missed when getting final questionnaire-response if any item prior to them is skipped due to any enablement condition. This leads to a critical issue of data silently missed from final submitted response irrespective of that the user actually filled the data.
On close inspection and debugging of code it was noted that the MoreQuestionnaireResponsesKt#unpackRepeatedGroups is the real issue where it is using zip-indexing i.e. index to index mapping of items for unpacking. This leads to invalid mapping when one of the items was missed due to enablement condition and hence the next question does not map to the group and does not loop over its nested items.
The items which are not group although work fine for missed enablement condition items displayed prior to it. There is no issue in rendering and form views work fine.
Component
SDC library
To Reproduce
Replace skip-logic-behavior questionnaire with below and choose 'Yes' for first item. Then provide values for all questions. See the date is missing from final output because there are 2 other items which were not enabled on 'Yes'.
Expected behavior
The value should show in final response for date as well when provided
Screenshots
Would you like to work on the issue?
The text was updated successfully, but these errors were encountered: