Skip to content
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

Crash while using the questionnaire response without disabled items generated by the SDK to resume form filling. #836

Closed
joiskash opened this issue Oct 13, 2021 · 0 comments · Fixed by #926 or #982
Assignees
Labels
type:bug Something isn't working

Comments

@joiskash
Copy link
Collaborator

Describe the bug
After the decision to remove questionnaireResponse items which are not enabled from the Questionnaire Response (more details in #755) , the validateQuestionnaireResponseItems function in the QuestionnaireViewModel had to be updated because it was initially written assuming that disabled questionnaireResponse Items would also be there in the QuestionnaireReponse with empty answers.

Component
SDC library

To Reproduce
Steps to reproduce the behavior:

  1. Use a questionnaire with an item that has enable when
  2. Answer the questionnaire such that enableWhen is false
  3. Use the questionnaire response that is output and the questionnaire as input to the fragment
  4. App will crash.

Expected behavior
App should not crash since the spec clearly mentions that the disabled answers "may" be present

When a QuestionnaireResponse references a Questionnaire, all the items in the questionnaire SHOULD be included in the QuestionnaireResponse if they are relevant to the interpretation of the answers, including items of type = display. This might also include items that were >not enabled when the Questionnaire was answered, though of course these will not have answers

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. Pixel4a emulator]
  • Android version: [e.g. Settings -> About phone -> Android version]
  • Build number: [e.g. Settings -> About phone -> Build number]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Would you like to work on the issue?
Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment