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

CCAP-63 Add new PDF custom preparers #410

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

cy-by
Copy link
Contributor

@cy-by cy-by commented Jul 23, 2024

🔗 Jira ticket

CCAP-63

✍️ Description

  • Add unit test for parentFullName
  • Add unit test for receivedTimestamp
  • Ignore these fields in verifyPDF because fields from custom preparers aren't in the db and that's a limitation of our pdf testing.
  • I moved the call to the action FormatSubmittedAtDate to happen on the submit-confirmation screen so that it was triggering after the submittedAt is filled, so that the confirmation screen correctly displays the formatted date time (this was not apart of the ticket but it was simple and closely releated).

2024-07-23 at 12 49 47@2x

✅ Completion tasks

  • Added relevant tests
  • Meets acceptance criteria

@cy-by cy-by self-assigned this Jul 23, 2024
@github-actions github-actions bot requested a review from enyia21 July 23, 2024 18:57
@enyia21 enyia21 temporarily deployed to il-gcc-ccap-63-map-time-qlrch4 July 23, 2024 18:59 Inactive
@analoo analoo self-requested a review July 24, 2024 16:35
submittedAt.ifPresent(offsetDateTime -> {
offsetDateTime.atZoneSameInstant(chicagoTimeZone);
String formattedSubmittedAtDate = offsetDateTime.atZoneSameInstant(chicagoTimeZone).format(receivedTimestampFormat);
results.put("receivedTimestamp", new SingleField("receivedTimestamp", formattedSubmittedAtDate, null));
Copy link
Contributor

@analoo analoo Jul 24, 2024

Choose a reason for hiding this comment

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

Wondering if we can use formattedSubmittedAtDate and formattedSubmittedAtDate to set the value instead of adding new logic.

It seems like the receivedTimestamp value we want is =

submission.getInputData().get("formattedSubmittedAtDate") +", "+submission.getInputData().get("formattedSubmittedAtTime")+ " CST"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm formattedSubmittedAtDate isn't available. Maybe it related to this bug mentioned in slack. Looking into it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok so I'm not going to use formattedSubmittedAtDate and formattedSubmittedAtTime for a few reasons:

  1. These values are not added until the action FormatSubmittedAtDate runs. Which means this couldn't be unit tested.
  2. The format that those produce are in a different format.
  • 🔴 07/25/2024 at 3:22 PM
  • 🟢 June 25, 2024, 3:22 PM CDT
  1. CST can't be a string because half the year it's CST and the other half of the year it's CDT.
  2. The action is really just meant to be a utility to format the date for display on the screen and I don't want to also add other responsibilities to it.

2024-07-25 at 15 23 50@2x

@cy-by cy-by changed the title Add new PDF custom preparers CCAP-63 Add new PDF custom preparers Jul 25, 2024
@cy-by cy-by force-pushed the CCAP-63-map-time-stamp-and-applicant-name branch from f76188e to 574748d Compare July 25, 2024 20:33
@cy-by cy-by temporarily deployed to il-gcc-ccap-63-map-time-qlrch4 July 25, 2024 20:34 Inactive
@analoo
Copy link
Contributor

analoo commented Jul 26, 2024

Looks great!

Cypress Borg added 2 commits July 26, 2024 10:36
- Add unit test for parentFullName
- Add unit test for receivedTimestamp
- Ignore these fields in verifyPDF
… on the screen it needs the variables for rendering
@cy-by cy-by force-pushed the CCAP-63-map-time-stamp-and-applicant-name branch from 574748d to c15f9c6 Compare July 26, 2024 15:36
@cy-by cy-by temporarily deployed to il-gcc-ccap-63-map-time-qlrch4 July 26, 2024 15:36 Inactive
@cy-by cy-by merged commit bd97380 into main Jul 26, 2024
5 checks passed
@cy-by cy-by deleted the CCAP-63-map-time-stamp-and-applicant-name branch July 26, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants