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

Bug: Fix REC_SSI Cat4 Validator #3129

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Bug: Fix REC_SSI Cat4 Validator #3129

merged 3 commits into from
Aug 12, 2024

Conversation

elipe17
Copy link

@elipe17 elipe17 commented Aug 6, 2024

Summary of Changes

How to Test

cd tdrs-frontend && docker-compose up
cd tdrs-backend && docker-compose up
  1. Open http://localhost:3000/ and sign in.
  2. Submit the two files below and verify they are no longer labeled as Rejected
    IN_SSPClosed_anon.txt
    MI_TANFClosed_anon.txt

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

  • REC_SSI cat4 validators match spreadsheet logic
  • Test coverage
  • Tests pass

Deliverable 2: Tested Code

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces backend code changes, are they meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested?
  • Are code coverage minimums met?
    • Frontend coverage: [insert coverage %] (see CodeCov Report comment in PR)
    • Backend coverage: [insert coverage %] (see CodeCov Report comment in PR)

Deliverable 3: Properly Styled Code

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?
  • Are code maintainability principles being followed?

Deliverable 4: Accessible

  • Does this PR complete the epic?
  • Are links included to any other gov-approved PRs associated with epic?
  • Does PR include documentation for Raft's a11y review?
  • Did automated and manual testing with iamjolly and ttran-hub using Accessibility Insights reveal any errors introduced in this PR?

Deliverable 5: Deployed

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

  • Does this PR provide background for why coding decisions were made?
  • If this PR introduces backend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces frontend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces dependencies, are their licenses documented?
  • Can reviewer explain and take ownership of these elements presented in this code review?

Deliverable 7: Secure

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any new security issues?
  • If new issues detected, is investigation and/or remediation plan documented?

Deliverable 8: User Research

Research product(s) clearly articulate(s):

  • the purpose of the research
  • methods used to conduct the research
  • who participated in the research
  • what was tested and how
  • impact of research on TDP
  • (if applicable) final design mockups produced for TDP development

@elipe17 elipe17 added bug backend dev raft review This issue is ready for raft review Priority Use this label for issues or PRs that need to be expedited labels Aug 6, 2024
@elipe17 elipe17 self-assigned this Aug 6, 2024
),
T5Factory.create(
RPT_MONTH_YEAR=202010,
CASE_NUMBER='123',
DATE_OF_BIRTH="19970209",
FAMILY_AFFILIATION=2, # validator only applies to fam_affil = 1; won't generate error
REC_AID_TOTALLY_DISABLED=2,
REC_SSI=2
REC_SSI=0
Copy link
Author

Choose a reason for hiding this comment

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

Changed this to 0 to prove that the FAMILY_AFFILIATION value was excluding it from the validator and therefore only generating the single error as opposed to two errors.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.01%. Comparing base (3b7a138) to head (cb10046).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3129   +/-   ##
========================================
  Coverage    93.01%   93.01%           
========================================
  Files          277      277           
  Lines         7421     7421           
  Branches       660      660           
========================================
  Hits          6903     6903           
  Misses         415      415           
  Partials       103      103           
Flag Coverage Δ
dev-backend 93.08% <100.00%> (ø)
dev-frontend 92.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...d/tdpservice/parsers/case_consistency_validator.py 97.39% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfb55bf...cb10046. Read the comment docs.

Copy link

@raftmsohani raftmsohani left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrew-jameson andrew-jameson added QASP Review and removed raft review This issue is ready for raft review labels Aug 7, 2024
@elipe17 elipe17 requested review from ADPennington and removed request for andrew-jameson August 8, 2024 13:37
@ADPennington ADPennington added the Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI label Aug 10, 2024
@ADPennington ADPennington added Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI and removed Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI labels Aug 10, 2024
Copy link
Collaborator

@ADPennington ADPennington left a comment

Choose a reason for hiding this comment

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

lgtm! thanks @elipe17 🚀

confirmed the following:

  • Cat 4 error raised when fam affil=1 and rec_ssi out of range for a state ✔️
  • error not raised when condition not present ✔️
  • Cat 4 error raised when fam affil=1 and rec_ssi out of range for a territory ✔️

@ADPennington ADPennington added Ready to Merge and removed QASP Review Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI labels Aug 12, 2024
@elipe17 elipe17 merged commit c632f19 into develop Aug 12, 2024
25 checks passed
@elipe17 elipe17 deleted the 3073-closed-case-errors branch August 12, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug dev Priority Use this label for issues or PRs that need to be expedited Ready to Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] TDP is raising cat 4 error on TANF/SSP closed case files that is not present
5 participants