dialob / dialob-parent

Apache License 2.0
1 stars 1 forks source link

Discard out of range answers when creating a new session #213

Open villuv opened 1 week ago

villuv commented 1 week ago

When POSTing new session with predefined answers, valueset based items should have their answers discarded (made unanswered) if the given values are outside of associated valueset item keys. This affects all value-set based answers like list, multichoice and survey.

Can be made configurable on/off if needed.

Scenario:

User has completed a session with form version A. Form version B has valueset options changed so that the previously available option is not in the list any more. A new session is created for form version B by copying answers from the previous session.

Now: choice list answer is in "answered" state with out-of-range value, user is not seeing the value as it doesn't exist any more.

Should be: out of range answer is cleared from the new session, user must provide new answer.