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

Add logic to update missing user state and region values #334

Merged

Conversation

nickviola
Copy link
Collaborator

@nickviola nickviola commented Jun 11, 2024

πŸ—£ Description

Closes: https://maestro.dhs.gov/jira/browse/CRASM-345

Need to prompt user for State dropdown selection if user.state is null, undefined, or β€œβ€. A dropdown should be presented on login if a user does not have a state value set.

Modify the backend users API to update the regionId field upon updating state values from the region/state mapping that was previously being used in registration.

Once a user selects a state and clicks β€œsave”, they will have their state and regionId values updated and proceed to the landing page of the application. The user will continue to get the prompt for state selection as long as the value is not set.

πŸ’­ Motivation and context

State and Region values were null on user import/export, so this allows the user to select the information on login.

πŸ§ͺ Testing

Test locally by removing state and regionId values manually in DB, and then logging in. You should be asked to update state and see the change for regionId and state update in the Database. Once state is set, you should no longer get this prompt on login.

πŸ“· Screenshots (if appropriate)

Screenshot 2024-06-11 at 5 28 38β€―AM Screenshot 2024-06-11 at 5 29 01β€―AM Screenshot 2024-06-11 at 5 29 10β€―AM Screenshot 2024-06-11 at 5 29 37β€―AM

βœ… Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

@nickviola nickviola self-assigned this Jun 11, 2024
@nickviola nickviola requested review from ameliav and JCantu248 June 11, 2024 13:36
@nickviola nickviola marked this pull request as ready for review June 11, 2024 13:38
Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ameliav ameliav left a comment

Choose a reason for hiding this comment

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

LGTM

@schmelz21 schmelz21 merged commit 46bc01a into develop Jun 18, 2024
18 of 22 checks passed
@schmelz21 schmelz21 deleted the feature/add-logic-to=update-missing-user-state-and-regionId branch June 18, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants