Skip to content

LG-12393: barcode attention should only be shown when image upload is successful#10099

Merged
amirbey merged 1 commit intomainfrom
amirbey/LG-12393-invalid-pii-with-attention
Feb 20, 2024
Merged

LG-12393: barcode attention should only be shown when image upload is successful#10099
amirbey merged 1 commit intomainfrom
amirbey/LG-12393-invalid-pii-with-attention

Conversation

@amirbey
Copy link
Copy Markdown
Contributor

@amirbey amirbey commented Feb 15, 2024

🎫 Ticket

Link to the relevant ticket:
LG-12393

🛠 Summary of changes

Only present BarcodeWarning when the image upload is successful as in the doc auth and pii validation is successful.

📜 Testing Plan

  • Submit doc auth image/yml that contains invalid pii and an attention doc auth result.
  • Veify the failed ID screen is shown with the option to Try Again

👀 Screenshots

If relevant, include a screenshot or screen capture of the changes.

Before: Screenshot 2024-02-12 at 8 49 05 PM
After: Screenshot 2024-02-12 at 8 53 19 PM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought we only did anything with this if it was unsuccessful?

Noting how the use of it...

if (result.ocr_pii) {
error.pii = result.ocr_pii;
}

...is within a block to check for unsuccessful:

Copy link
Copy Markdown
Contributor Author

@amirbey amirbey Feb 15, 2024

Choose a reason for hiding this comment

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

👋🏿 @aduth ... for the BarcodeAttentionWarning screen to appear, the barcode attention should be the only reason why the result is failed

@amirbey amirbey marked this pull request as ready for review February 15, 2024 21:39
@amirbey amirbey changed the title LG-12393: barcode attention should only be shown when api image upload is successful LG-12393: barcode attention should only be shown when image upload is successful Feb 16, 2024
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This probably doesn't matter too much - but I tried out your testing plan. On your branch it worked perfectly, just as described!

On main, I did see a little bit of different behavior than your "before" screenshot, so I just wanted to note it here. Instead of seeing the "technical difficulties" message, I got a "barcode" warning screen showing me the pii from the yml, including that the dob was missing, but no dob message.

Screenshot 2024-02-16 at 10 46 18 AM

On both main and your branch I used a yml file that had an attention with barcode message and a missing DOB.

Ultimately since the end result was the same as expected, it's probably not too important, but wanted to note it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@night-jellyfish , i think there is some front end logic check attention with barcode to display it or not.

Copy link
Copy Markdown
Contributor

@dawei-nava dawei-nava Feb 16, 2024

Choose a reason for hiding this comment

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

@night-jellyfish
On front end, we have error and pii(which is the ocr_pii from backend).

if (!hasDismissed && pii) {
return <BarcodeAttentionWarning onDismiss={onWarningPageDismissed} pii={pii} />;
}

Based on LG-5918, it seems suggesting that these ocr_pii fields missing/error can come with Attention with barcode read as the only error(Attention), while other pii errors should cause some cross checking errors too(meaning barcode read is not the only error).

So I am wondering whether we are testing some pii scenarios(not related firstname, lastname and dob, OCRed fileds, like missing address) that were thought not realistic from LG-5918.

@aduth, do you have any insight or memory on this part?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel like I should probably know this...but what is OCR?

I tried doing a quick search but came across references that seemed to range from a concept to a specific org, so I wanted to clarify.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@night-jellyfish , I think OCR here means optical character recognization?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is curious to me, especially given my note above - is there a reason you changed from no dob to no address? I would have thought all pii would behave the same.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I also found that this is the only place we use the no_dob.yml.

If we are switching to no_address.yml should we remove the un-used no_dob?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

while debugging this and trying to understand the issue, there was a period where I thought the underlying issue was something different and had created the address file along the way. Having gotten to the bottom of the issue, I understand that it doesn't matter whether it's dob or address. I left the address as because I figured it'd be good to have more test files.

Copy link
Copy Markdown
Contributor

@eileen-nava eileen-nava left a comment

Choose a reason for hiding this comment

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

I probably would have fixed this by making a change to review-issues-step.tsx and changing this line to if (errors.length == 0 && !hasDismissed && pii) { , but changing it in the presenter works, too.

LGTM! 👏🏻

…on is successful

changelog: Bug Fixes, Document Authentication, Attention with Barcode only when image upload is successful"
@amirbey amirbey force-pushed the amirbey/LG-12393-invalid-pii-with-attention branch from cd62b60 to 775885b Compare February 20, 2024 12:25
@amirbey amirbey merged commit 0c0854e into main Feb 20, 2024
@amirbey amirbey deleted the amirbey/LG-12393-invalid-pii-with-attention branch February 20, 2024 12:49
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.

5 participants