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

fix(mrf): individual response page #6992

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

justynoh
Copy link
Contributor

@justynoh justynoh commented Jan 3, 2024

Problem

The individual response page for MRF hides some questions if they are unfilled and shows others. This PR fixes this.

Closes FRM-1593

Solution

The reason for this is due to schema differences between fields. Some fields have schema answer: { value: string } while some only have answer: string (this is required for special fields allowing multiple value types, such as radio, checkbox and table). Those with schema answer: string were filtered on save so that those with !answer were filtered out, which matches undefined and '' values. Therefore, on decryption, we 'backfill' the value as '' instead of ignoring the question.

Breaking Changes

  • No - this PR is backwards compatible

Copy link

linear bot commented Jan 3, 2024

Copy link
Contributor

@KenLSM KenLSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @justynoh for the quick turnaround!

I would like to clarify that the subsequent submissions by the next respondent will not be affected by this "prefill" as this is admin-side?

i.e.,

  • 1st respondent fills in fields A, and C, and submits.
  • 2nd respondent fills in field D and submits, field B will still be empty instead of '' in the DB

@justynoh
Copy link
Contributor Author

justynoh commented Jan 3, 2024

yessu correct! Because this is purely on the rendering side on the individual response page, so nothing on the respondent side is affected

@justynoh justynoh merged commit 92bdae9 into develop Jan 3, 2024
29 checks passed
@justynoh justynoh deleted the fix/mrf-individual-response branch January 3, 2024 05:48
@wanlingt wanlingt mentioned this pull request Jan 3, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants