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

1755 - As a data analyst, I need to be able to upload SSP data files #2236

Merged
merged 64 commits into from
Nov 8, 2022

Conversation

n0remac
Copy link

@n0remac n0remac commented Nov 4, 2022

Summary of Changes

Provide a brief summary of changes
Pull request closes #1755 #2154

This recording shows a dev belonging to an STT that has SSP access submitting those file:
https://user-images.githubusercontent.com/7119690/200042287-a4cee7ea-080f-4e03-bfad-6bf890d018b1.mov

This recording shows a dev belonging to an STT withou SSP access submitting a TANF file:
https://user-images.githubusercontent.com/7119690/200042478-799a6e90-61a5-415d-9aa1-5771f61b7b8c.mov

This recording shows a OFA Admin selecting an STT with SSP access and submitting TANF and SSP files. There is a bug where the previously uploaded file displayed is first file uploaded for that section instead of the last:
https://user-images.githubusercontent.com/7119690/200042661-c9649db7-df46-4588-9134-b08b790ced56.mov

How to Test

  1. 1755
    • Log in as a user with an STT (with ssp = True) assigned.
    • Navigate to the Data Files page, a radio button should display allowing the user to select TANF or SSP-MOE data reports. (Not visible if ssp = False for the user's STT)
    • Selecting a radio option should apply to the search (GET request)
    • When search is clicked, the Reports header is uploaded to include the submission type (TANF or SSP-MOE)
    • When a file is uploaded, if SSP-MOE is selected from the radio buttons, Ssp will be prepended to the data report's section in the Django Admin Console (when TANF is selected, nothing is prepended)
    • When the radio button selection is changed, search must be clicked before the selection will apply to uploaded files. If a file is attached (but not submitted) and search selections are changed, a modal will appear when clicking search (Fix/992 notify data file search selection changes #2209 frontend changes)
    • (Revalidate) Selecting a radio option should apply to the search (GET request)
      • NOTE: the "Download File" button does not download the latest version of the file if there are multiple submitted. I believe this is an existing bug.
  2. 2154
    • When a file is submitted for an STT with ssp = True, the file name should be selected from the SSP ${section} of the STT's filenames.
      • NOTE: if the section doesn't exist in the STT's filenames, this will throw an exception. I believe this is an existing issue and will be addressed with future work.

Deliverables

1755 ACS:

  • STT Data Analyst can select the type of data report being uploaded
  • Radio button section not visible to users of STTs without SSP indicator
  • Radio select defaults to TANF
  • Heading 1 is modified to read "Data Files" instead of "TANF Data Files"
  • Heading 2 prints radio selection between [STT Name] and [Fiscal Year]
  • Testing Checklist has been run and all tests pass
  • README is updated, if necessary

2154 ACS:

  • SSP section is available in data file upload in frontend
  • SSP section files are correctly renamed as per naming convention in STT model filename
  • filename property in datafile model has the correct logic to rename STT section files using the states table
  • lfrohlich and/or adpennington confirmed that ACs are met.

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

@raftmsohani raftmsohani 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 Nov 8, 2022
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.

excellent work dev team! @n0remac @raftmsohani @jtimpe 🥇 cc: @andrew-jameson ready to merge! cc: @ttran-hub

testing notes below:


SSP state (46:50): Vermont, submitting as Data Analyst for Q2, 2022: section 1 and 4 (state doesnt submit section 4)

  • results: 🚀

    • data submission

      frontend: TANF
      1755p1

      frontend:SSP
      1755p2

      backend: data_file model
      1755p6

      backend: logentries
      1755p5

      backend: STTs model
      1755p4

    titan
    1755p3

    • modal works when changing selections for file type before submission ✔️
    • anchor to submission result looks good. ✔️
    • all users associated with STT get data submission emails ✔️
    • data submission for OFA Admins look good, too (submitted tanf + ssp for CA). ✔️

non-SSP state: Mississippi (25:28), submitting for Q2, 2022: section 1 and 4 (doesnt submit SSP, submits section 4)

  • results: 🚀

    • no SSP on frontend ✔️
    • no SSP on backend in STTs model ✔️

tribe: Nez Perce Tribe (86:168), submitting for Q2, 2022: section 1 and 4 ( doesnt submit section 4 or SSP)

  • results: 🚀

    • no SSP on frontend ✔️
    • no SSP on backend in STTs model ✔️
    • email looks good. like the addition of Tribal in subject ✔️

territory: VI (54:78), submitting for Q2, 2022: section 1 and 4 ( doesnt submit section 4 or SSP)

  • results: 🚀

    • no SSP on frontend ✔️
    • no SSP on backend in STTs model ✔️

all files submitted to titan (none are for files like s4 that some stts dont submit)
1755p7

@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 Nov 8, 2022
@andrew-jameson andrew-jameson merged commit a0fd0b6 into develop Nov 8, 2022
@andrew-jameson andrew-jameson deleted the 2154+1755-jtjt branch November 8, 2022 17:31
This was referenced Nov 10, 2022
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.

As an STT data analyst, I need to tell TDP which data report I am uploading
5 participants