You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
#1973 the PR has the fix for issue, however, it is failing one of the test should not modify other items while unpacking repeated groups which assumes that the function would not modify any items other than group. I could not understand the usage and figure out the need for that. Kindly review PR and suggest an alternate fix.
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: