fecgov / fecfile-web-app

7 stars 4 forks source link

Fix "TELEPHONE" field unable to Save and field Validation on Contacts page #2109

Closed exalate-issue-sync[bot] closed 3 days ago

exalate-issue-sync[bot] commented 4 weeks ago

Description: Where was the issue found: Committee ID: C00100495 Environment: STAGE/DEV * Browser: Chrome

Please describe the issue: '"TELEPHONE" field unable to Save and field Validation is broken on contact page. This happens whether creating or editing existing contact.

Validation Error message should read: This field must contain 10 numeric characters

Approx. time the issue was found: 8:30 am on 08/14/2024

How to replicate the issue:

  1. Select an existing contact from the “Manage contacts” page to edit.
  2. In telephone field entered 14 number characters. Validation error does not appear “This field must contain 10 numeric characters” (This is part of bug)

image-20240815-161543.png

3. Select “Save” button, the contact popup showing suggested changes then select continue acts like saving contact, which it should not. (This is part of bug)

image-20240815-161343.png

4. Created new contact and entered the required 10 numeric characters, selected Save, the contact information saved but did not save the telephone number

image-20240815-162540.png

Mitchell Jarrett Matt Travers Todd Lees Bug found during testing of Sprint 46 on STAGE, also verified on DEV. Pointed 3 pts and assigned to Sprint 47 - Sprint Backlog

Screenshots:

See screenshots in steps above.

QA Notes

null

DEV Notes

null

Design

null

See full ticket and images here: FECFILE-1530

exalate-issue-sync[bot] commented 4 weeks ago

Matt Travers commented: [~accountid:627ebeb2236090006f61d37d] [~accountid:712020:005cf740-faa3-4d67-baff-f316981bdc9f] The use of the google validation library is working on the front end but not integrating with the validation code we have created with the JSON files. Here is the API response when saving 888-888-8888 with a US country code:

!image-20240815-215519.png|width=1969,height=635,alt="image-20240815-215519.png"! See image in Jira

A few issues to note:

The text of the red error message has changed but that is not a requirement of this ticket.

The telephone format must be in a specific format as defined by the JSON validation in order to be saved to the database

I believe we are saving the 3 country code digits in addition to the normal 10 digits so that the UI widget works properly

Interestingly, although we are saving the phone number, none of the reports or schedules we submit to EFO use the field so we need to be careful down the road when we insert that data field into the *.fec file

Sending ticket back to In Progress

exalate-issue-sync[bot] commented 3 weeks ago

Passes CR. Sending to QA.

exalate-issue-sync[bot] commented 3 weeks ago

Shelly Wise commented: QA review noticed the error message is for 15 alphanumeric characters instead of 10 alphanumeric characters. [~accountid:557058:3e765e5c-5614-4ef8-975a-6f5202ed75a9] [~accountid:627ebeb2236090006f61d37d] sending back to in-progress for fix.

!image-20240822-132118.png|width=546,height=159,alt="image-20240822-132118.png"! See image in Jira

exalate-issue-sync[bot] commented 3 weeks ago

Fix deployed to DEV. There was a maxlength of 15 rule in the validation schema for telephone numbers that was triggering the “15 alphanumeric characters” error message. The format for telephone numbers is actually 10 digits and captured in a regex pattern rule in the schema. The maxlength rule was removed for all contact type telephone fields.

Passes CR. Sending to QA.

exalate-issue-sync[bot] commented 3 weeks ago

Shelly Wise commented: QA review verified the error message is for 10 alphanumeric characters instead of 15 alphanumeric characters. Fix Completed.

!image-20240822-142027.png|width=746,height=210,alt="image-20240822-142027.png"! See image in Jira

QA Review Completed. Moved to Stage Ready.

exalate-issue-sync[bot] commented 3 days ago

Automation for Jira commented: Sprint accepted by Paul Clark at Sprint Review on comment date.