department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 197 forks source link

Toxic Exposure 1.0: Validation issues - Remove duplicate service periods spike #87717

Closed aurora-a-k-a-lightning closed 1 month ago

aurora-a-k-a-lightning commented 1 month ago

Issue Description

Validation errors were found when using the Lighthouse submit From526 validation endpoint. This particular error happened when there were duplicate Service Periods.

We want to test if we can have the submission succeed if the data is sent to the generatePDF endpoint.


Tasks

Acceptance Criteria

Out of scope - we may need to do this later The task here is to remove duplicate service periods found in the service periods array.


How to configure this issue

pacerwow commented 1 month ago

@mengA6 can you advise on the error message language for this? @christinec-fftc to look into how the serviceHistory component behaves. Nor sure if this is a Platform component or not. TBD. Can we silently clean this up or do we need to tell the Veteran that they need to fix it? - OCTO, VBA, LH question. First we'll go to OCTO for guidance. - JP AI

mengA6 commented 1 month ago

Okay, if it turns out we need to have the Veteran correct something, let me know and I can pull this in as a design task

mengA6 commented 1 month ago

(discussion from huddle 16th minute)

Not sure if it's coming from prefill or the Veteran entering it. Somehow they get the same exact branch and beginning / end dates for multiple periods of service. Either way we want to avoid getting into the state. Currently it blocks submission.

Backend discovery ticket to determine how EVSS handles this and if Lighthouse should handle it gracefully

Jared to decide / communicate if we're doing the front end validation before launch

Mike to create design ticket, Christine to create ticket for discovery on feasibility of front end validation.

mengA6 commented 1 month ago

I created Design validation to prevent duplicate service periods #88216 to capture the design work needed.

pacerwow commented 1 month ago

Related FE ticket: https://app.zenhub.com/workspaces/disability-experience-63dbdb0a401c4400119d3a44/issues/gh/department-of-veterans-affairs/va.gov-team/88275

pacerwow commented 1 month ago

EVSS allows this, we should ask LH if they should remove this validation.

sethdarragile6 commented 1 month ago

Confirmed that calling the generatePDF endpoint (with minimum validation) does indeed work with duplicate service periods: image.pngimage.png

This means that, even if the submit itself fails validation, a workaround exists to manually generate the PDF and upload it to VBMS.

sethdarragile6 commented 1 month ago

Unexpected side quest performed under this ticket: a bug was found where the Obligation Term of Service dates were not getting populated on the PDF. This fix was merged to master, and tested successfully in Staging

Screenshot 2024-07-18 145337.png Screenshot 2024-07-18 145119.png image.png
sethdarragile6 commented 1 month ago

☝️in the above example, I entered service periods duplicated on everything but BOS. In this case, Army and Air Force Reserves. As you can see below, it captures the Air Force Reserve period and presumably captures the Army one in 20D but doesn't seem to capture that BOS here or on the overflow pages. This is largely a limitation of the form itself, I think.

Screenshot 2024-07-18 145010.png

However when I did a local test of the generatePDF with a similar scenario (except with Army and Air National Guard), the results seem more confusing. "Army" is captured in 19A+19B, and presumably "Air National Guard" is captured in 20D, but only the "National Guard" part is captured in 21B (i.e. where's the Air? 😂) Again, a limitation of the form, and nothing on the overflow page to indicate the "Air" part.

image.png