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-571] - set earliest childcare start date in flow #990

Merged
merged 6 commits into from
Jan 8, 2025

Conversation

analoo
Copy link
Contributor

@analoo analoo commented Jan 7, 2025

🔗 Jira ticket

CCAP-571

✍️ Description

  • Instead of determining the earliest date of care in the application preparer, we will have a field that tracks earliest child care start date and update it when a new child is added and update it when the child is deleted. Why? Because we need this date in the provider flow and it makes more sense to have a field that tracks it than to have multiple areas of code calculating the same number Also, it it's current iteration, it was only checking the earliest date of the first 4 children in the family.
  • Refactor date checkers to use the verifyDate Action which includes share logic such as date time formatters and helper methods
  • Move some logic to the DateUtlities file to reuse shared logic
  • Update SubmissionTestBuilder to include day, year, month input data as well as date
  • Tests confirm that the actions work as expected

📷 Design reference

n/a

✅ Completion tasks

  • Added relevant tests
  • Meets acceptance criteria

@github-actions github-actions bot requested a review from enyia21 January 7, 2025 02:58
@enyia21 enyia21 temporarily deployed to il-gcc-ccap-571-set-ear-1zcnqy January 7, 2025 03:00 Inactive
DateTimeFormatter formatter) {
if (earliestCCAPStartDate.isBlank()) {
return childCCAPStartDate;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these methods moved to either the Verify date action or Date Utilities

String formattedMonth = String.format("%02d", Integer.parseInt(month));
String formattedDay = String.format("%02d", Integer.parseInt(day));

return String.format("%s/%s/%s",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now this method saves dates with leading zeros so no need to have an extra method that does that

@analoo analoo force-pushed the CCAP-571-set-earliest-childcare-start-date-in-flow branch from 3d849cd to 7b2723f Compare January 7, 2025 03:06
@enyia21 enyia21 temporarily deployed to il-gcc-ccap-571-set-ear-1zcnqy January 7, 2025 03:06 Inactive
@enyia21 enyia21 temporarily deployed to il-gcc-ccap-571-set-ear-1zcnqy January 7, 2025 03:12 Inactive
return earliestDate.get().isBefore(childcareStartDate.get()) ? earliestCCAPStartDate : childCCAPStartDate;
}

private String addLeadingZerosToDateString(String dateStr) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

leading zeros are added when the date is set

@enyia21 enyia21 temporarily deployed to il-gcc-ccap-571-set-ear-1zcnqy January 7, 2025 03:21 Inactive
@analoo analoo changed the title Ccap 571 set earliest childcare start date in flow [CCAP-571] - set earliest childcare start date in flow Jan 7, 2025
Copy link
Contributor

@cram-cfa cram-cfa left a comment

Choose a reason for hiding this comment

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

this looks good to me! thanks!

@@ -467,6 +467,7 @@ flow:
doc-upload-confirm:
nextScreens: null
children-delete:
onPostAction: UpdateEarliestCCAPStartDate
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm this is not triggering. Any ideas @cram-cfa @enyia21

Copy link
Contributor

Choose a reason for hiding this comment

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

hm. could it be because the nextScreens is null? what happens if you put some random screen there for it to go... somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That doesn't resolve it unfortunately

@enyia21 enyia21 temporarily deployed to il-gcc-ccap-571-set-ear-1zcnqy January 8, 2025 01:24 Inactive
@analoo analoo merged commit abbe569 into main Jan 8, 2025
5 checks passed
@analoo analoo deleted the CCAP-571-set-earliest-childcare-start-date-in-flow branch January 8, 2025 03:35
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.

3 participants