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

TAN-3906 - User fields in survey form #10391

Draft
wants to merge 24 commits into
base: TAN-3961-refactor-domicile
Choose a base branch
from

Conversation

jamesspeake
Copy link
Contributor

@jamesspeake jamesspeake commented Feb 19, 2025

How it works

  • New feature flag: user_fields_in_survey - always disabled for now
  • New attribute on phase: user_fields_in_form. Can only be set when the feature flag is on. When toggled on this:
    • Adds all user fields configured in access rights for the phase to a new page at the end of the survey
    • Enables permission custom fields for 'everyone' access rights
    • Removes the user custom fields from the user signup flow
    • If a user is logged in then the fields will pre-populate with the values from their profile

The way this works is by

  • User custom fields are merged with the Idea custom fields in CustomFieldsService and we change some attributes to return them as Idea custom fields. They then behave just as Idea custom fields.
  • Responses get saved in the idea record, but user field responses are prefixed with u_ and if a user is logged in it will also update their profile
  • This allows user custom fields to be used on anonymous submissions too and has the advantage that all data related to surveys is fixed in time
  • Because we have a clear way of identifying user fields in the survey, in the future it should be relatively easy to pull together demographics from both users and survey submissions if we want

Changelog

Added

  • Toggle to allow user fields to be asked as part of the survey form instead of part of registration

@jamesspeake jamesspeake added this to the Community Monitor milestone Feb 19, 2025
Copy link

@cl-dev-bot
Copy link
Collaborator

cl-dev-bot commented Feb 19, 2025

Messages
📖 Changelog provided 🎉
📖 Notion issue: TAN-3906
📖

Run the e2e tests

📖 Check translation progress

Generated by 🚫 dangerJS against faf5329

@jamesspeake jamesspeake changed the base branch from master to TAN-3961-refactor-domicile February 26, 2025 12:42
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