-
Notifications
You must be signed in to change notification settings - Fork 3
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
update dateYearIsLargerThan()
validator logic for RPT_MONTH_YEAR
#2793
Comments
dateYearIsLargerThan()
validator logic
dateYearIsLargerThan()
validator logicdateYearIsLargerThan()
validator logic for RPT_MONTH_YEAR
dateYearIsLargerThan()
validator logic for RPT_MONTH_YEAR
dateYearIsLargerThan()
validator logic for RPT_MONTH_YEAR
@reitermb could you provide feedback on the cat1 error message I have written to satisfy the above requirements? |
I like this! Only feedback would be switching around the friendly name there at the end to match the instructions.
More for my own awareness rather than a tweak request, do we have an easy way currently to pull in Item Number / Friendly Name stuff into this error? e.g. "Item 4 (Reporting Year and Month)" / Item 3 if SSP |
@reitermb thank you for the feedback on the error message! With respect to your other question, there is a way to get that information into the error message. But it is not very easy because it will require some decently large design changes, along with a slew of updates to the tests. That change will definitely need to stay scoped to the tickets that came out of the errors audit HackMD |
Description
We need a different validator for
YYYY
in theRPT_MONTH_YEAR
field. We currently use this:https://github.com/raft-tech/TANF-app/blob/develop/tdrs-backend/tdpservice/parsers/validators.py#L371L376
below is an edge case:
records with
RPT_MONTH_YEAR
==202 00
raises the following error message:reporting month year is required but a value was not provided
and it still gets stored in the db. Couple of issues with this:RPT_MONTH_YEAR
was provided, but it is invalid (i.e. does not follow the YYYYMM format)Acceptance Criteria
RPT_MONTH_YEAR
but do not have a valid value are not parsed.Tasks
preparsing_validator
with a clear error messageParserError
is createdrow_precheck_error
Notes
preparsing_validator
so the row is not parsed when an invalidRPT_MONTH_YEAR
is encounteredSupporting Documentation
The text was updated successfully, but these errors were encountered: