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

Add empty string check for day to match how the app is submitting dat… #430

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

analoo
Copy link
Contributor

@analoo analoo commented Jul 26, 2024

…a in the form

🔗 Jira ticket

✍️ Description

📷 Design reference

✅ Completion tasks

  • Added relevant tests
  • Meets acceptance criteria

@@ -118,7 +118,7 @@ public static String getDateInputWithDayOptional(Submission submission, String i
return "";
} else if (year == null || month == null) {
throw new IllegalArgumentException("Date must be complete if specified");
} else if ( day == null ){
} else if ( day == null || day.isEmpty() ){
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the form will actually submit day as an empty string but adding a null check here as well to be extra careful.

year and month should never be saved as null because there is a front end validation keeping the user from being able to save when those two values are blank if either of them is present.

@enyia21 enyia21 temporarily deployed to il-gcc-ccap-241-write-p-xsre7c July 26, 2024 22:14 Inactive
@enyia21 enyia21 temporarily deployed to il-gcc-ccap-241-write-p-xsre7c July 26, 2024 22:15 Inactive
Copy link
Contributor

@cy-by cy-by left a comment

Choose a reason for hiding this comment

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

Tested locally, only filled month and year and saw the result in the PDF:

2024-07-26 at 17 26 31@2x

@analoo analoo merged commit 75fd891 into main Jul 26, 2024
5 checks passed
@analoo analoo deleted the CCAP-241-write-partial-term-dates-to-pdf branch July 26, 2024 22:31
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.

4 participants