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

MR-3578 Fix Date Added document date bug #1827

Merged
merged 7 commits into from
Jul 21, 2023
Merged

Conversation

haworku
Copy link
Contributor

@haworku haworku commented Jul 21, 2023

Summary

Use the submitInfo.updatedAt instead of the proto updatedAt to determine the date added for documents.

Related issues

https://qmacbis.atlassian.net/browse/MR-3578

Screenshots

Test cases covered

UploadedDocumentsTable has some new tests to reflect the new behavior on review and submit with new submissions (don't show any date/empty string)

QA guidance

I ended up separating off the refactor so this change is pretty contained to uploaded documents behavior i would test that across submissions

- refactor how fetchHealthPlanPackageWrapper deals internally with data.
- pass along revisionsLookup instead of a form data look up
- adjust makeDocumentKeyLookup and makeDocumentDateLookup
- use JS set to simplify document list usage
@haworku haworku changed the title fix: MR-3578 Date Added document date bug MR-3578 Fix Date Added document date bug Jul 21, 2023
@haworku haworku requested review from rswerve, JasonLin0991 and macrael and removed request for rswerve July 21, 2023 15:29
const previousSubmissionDate =
documentDateLookupTable.previousSubmissionDate

if (!documentDate || !previousSubmissionDate) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I love a good series of if statements

console.error(
`makeDocumentS3KeyLookup- Failed to read S3 key for $${doc.name} - ${doc.s3URL}`
)
// fail silently, just return good documents
Copy link
Collaborator

Choose a reason for hiding this comment

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

really like the comments in this PR

Copy link
Collaborator

@rswerve rswerve left a comment

Choose a reason for hiding this comment

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

looks great. much clearer and more robust

@rswerve rswerve merged commit 9e7b9d4 into main Jul 21, 2023
27 checks passed
@rswerve rswerve deleted the MR-3578-doc-added-at-bug branch July 21, 2023 18:17
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.

2 participants