flexion / ef-cms

An Electronic Filing / Case Management System.
23 stars 10 forks source link

BUG: Admissions Clerk receives 400 error when adding a user's email if the email is in unverified status #10271

Open ttlenard opened 8 months ago

ttlenard commented 8 months ago

Dependent on 10208

Describe the Bug A clear and concise description of what the bug is. While doing some testing for #10007, I ran into an issue, and noticed that this is an existing issue in Production.

After discussing this with the team, we have decided that this fix can occur after #10007 is completed.

If a public user creates and account, but does not verify their email address, and then an Admissions clerk adds their email to their case, the Admissions clerk will receive a 400 error after confirming that there was a matching email.

Business Impact/Reason for Severity low

In which environment did you see this bug? exp, test

Who were you logged in as? Admissions clerk

What were you doing when you discovered this bug? (Using the application, demoing, smoke tests, testing other functionality, etc.) Testing other functionality

To Reproduce Steps to reproduce the behavior:

  1. Create a Petitioner account, but do not verify the email
  2. Log in as an Admissions Clerk
  3. Navigate to a case that has a paper service Petitioner
  4. Click on Case information tab
  5. Click on Parties tab
  6. Click on the edit button for the Petitioner with Paper service
  7. Add in the email that you created in step 1, reenter it
  8. Click save
  9. You will get the modal that there is a matching email, click ok
  10. Receive 400 error.

Expected Behavior A clear and concise description of what you expected to happen. I spoke with Admissions, and they thought that the smoothest solution to this would be to just wipe out the pending status of the user, and start the process from scratch. The user would end up getting the "a new account was created for you" email. If we start them from scratch, we wouldn't have to do the following, as we have to do now:

  1. reply to their eAccess email and ask them to verify their email. After they verify their email, they would need to let us know.
  2. After they verify their email, admissions clerk could then go in and add in their email to the case.

Actual Behavior A clear and concise description of what actually happened. If a user's email address is in a pending status, and an Admissions clerk adds their email to a case, they will receive a 400 error.

Screenshots If applicable, add screenshots to help explain your problem. Here is the unverified email that is about to get added to a petitioner record on a case

image.png

Here is the console

image.png

Here is the network tab

image.png

Desktop (please complete the following information):

Smartphone (please complete the following information):

Cause of Bug, If Known

Process for Logging a Bug:

Severity Definition:

Definition of Ready for Bugs(Created 10-4-21)

Definition used: A failure or flaw in the system which produces an incorrect or undesired result that deviates from the expected result or behavior. (Note: Expected results are use cases that have been documented in past user stories as acceptance criteria and test cases, and do not include strange behavior unrelated to use cases.)

The following criteria must be met in order for the development team to begin work on the bug.

The bug must:

Process: If the unexpected results are new use cases that have been identified, but not yet built, new acceptance criteria and test cases should be captured in a new user story and prioritized by the product owner.

If the Court is not able to reproduce the bug, add the “Unable to reproduce” tag. This will provide visibility into the type of support that may be needed by the Court. In the event that the Court cannot reproduce the bug, the Court will work with Flexion to communicate what type of troubleshooting help may be needed.

Definition of Done (Updated 4-14-21)

Product Owner

Engineering

rachelschneiderman commented 6 months ago

It is our recommendation that this bug be blocked until #10208 and #10313 are completed. The former will ensure that accounts in DAWSON are case insensitive and the latter will refactor the change email process to align with the pattern established for verifying a petitioner account in DAWSON. Once those two are complete, it will make addressing this bug simple as it will reduce issues with the user having entered an email address that is cased differently than the admissions clerk may enter it and will allow us to do things like renew the user's pending email link (if desired), re-send a confirmation email to the user (if desired), etc.