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

update dateYearIsLargerThan() validator logic for RPT_MONTH_YEAR #2793

Closed
5 tasks
ADPennington opened this issue Dec 27, 2023 · 3 comments · Fixed by #2849
Closed
5 tasks

update dateYearIsLargerThan() validator logic for RPT_MONTH_YEAR #2793

ADPennington opened this issue Dec 27, 2023 · 3 comments · Fixed by #2849
Assignees
Labels
dev Refined Ticket has been refined at the backlog refinement

Comments

@ADPennington
Copy link
Collaborator

ADPennington commented Dec 27, 2023

Description

We need a different validator for YYYY in the RPT_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:

  • OFA ultimately cant do anything with these records, so these shouldnt be parsed because we cant infer the reporting period.
  • the error message is unclear. a value for RPT_MONTH_YEAR was provided, but it is invalid (i.e. does not follow the YYYYMM format)

Acceptance Criteria

  • records that require a RPT_MONTH_YEAR but do not have a valid value are not parsed.
  • error message associated with this validator is clear/user-friendly.

Tasks

  • Implement preparsing_validator with a clear error message
  • Ensure the line is not parsed (no records created) and a cat 1 ParserError is created
  • Ensure the case aggregates counts reflect the new row_precheck_error

Notes

  • relevant to T1, T2, T3, T4, T5,M1,..., M5 for TANF, SSP, and Tribal TANF
  • possible approach is to implement a new preparsing_validator so the row is not parsed when an invalid RPT_MONTH_YEAR is encountered

Supporting Documentation

@ADPennington ADPennington changed the title [WIP] validator logic clean-up [WIP] update dateYearIsLargerThan() validator logic Dec 27, 2023
@ADPennington ADPennington changed the title [WIP] update dateYearIsLargerThan() validator logic [WIP] update dateYearIsLargerThan() validator logic for RPT_MONTH_YEAR Dec 27, 2023
@ADPennington ADPennington changed the title [WIP] update dateYearIsLargerThan() validator logic for RPT_MONTH_YEAR update dateYearIsLargerThan() validator logic for RPT_MONTH_YEAR Dec 29, 2023
@ADPennington ADPennington added dev and removed WIP labels Dec 29, 2023
@jtimpe jtimpe added the Refined Ticket has been refined at the backlog refinement label Jan 2, 2024
@elipe17
Copy link

elipe17 commented Feb 15, 2024

@reitermb could you provide feedback on the cat1 error message I have written to satisfy the above requirements?
The value: 202 10, does not follow the YYYYMM format for reporting month and year.

@reitermb
Copy link

@reitermb could you provide feedback on the cat1 error message I have written to satisfy the above requirements? The value: 202 10, does not follow the YYYYMM format for reporting month and year.

I like this! Only feedback would be switching around the friendly name there at the end to match the instructions.

The value: 202 10, does not follow the YYYYMM format for Reporting Year and Month.

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

@elipe17
Copy link

elipe17 commented Feb 16, 2024

@reitermb could you provide feedback on the cat1 error message I have written to satisfy the above requirements? The value: 202 10, does not follow the YYYYMM format for reporting month and year.

I like this! Only feedback would be switching around the friendly name there at the end to match the instructions.

The value: 202 10, does not follow the YYYYMM format for Reporting Year and Month.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Refined Ticket has been refined at the backlog refinement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants