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

3014 - Outdated submissions banner #3231

Merged
merged 26 commits into from
Nov 15, 2024
Merged

Conversation

jtimpe
Copy link

@jtimpe jtimpe commented Oct 11, 2024

Summary of Changes

Pull request closes #3014

  • adds outdated submissions banner for files submitted before 5/31/2024
  • removes the error report link for those files (replaces with "Not Available")
  • combine "submitted by" and "submitted on"

How to Test

cd tdrs-backend && docker compose up
cd tdrs-frontend && docker compose up --build
  1. Open http://localhost:3000/ and sign in.
  2. Submit a data file. Make sure the banner does not appear, and the error reports download link is shown.
  3. Modify the created_at field of the datafile to before 5/31/2024
    docker compose exec web python manage.py shell_plus
    
    f = DataFile.objects.all().first()
    from django.utils import timezone
    from datetime import datetime
    f.created_at = datetime(2023, 10, 11)
    f.save()
  4. Return to the datafiles page. Ensure the banner displays and the error report download link is replaced with "Not Available"

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:
+ [ ] Banner appears on submission history if 1 or more files are present for viewed quarter that were submitted prior to May 31, 2024
+ [ ] Banner does not appear if a given quarter doesn't have data submitted before May 31 2024
+ [ ] Language matches spec "Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information."

  • combine "submitted by" and "submitted on"
  • Testing Checklist has been run and all tests pass
  • 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

@jtimpe jtimpe self-assigned this Oct 11, 2024
@jtimpe jtimpe added raft review This issue is ready for raft review a11y-review PR is ready for accessibility review labels Oct 11, 2024
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 69.23077% with 8 lines in your changes missing coverage. Please review.

Project coverage is 91.49%. Comparing base (d6c1cfc) to head (11abfb5).
Report is 28 commits behind head on develop.

Files with missing lines Patch % Lines
...ntend/src/components/SubmissionHistory/helpers.jsx 66.66% 2 Missing and 2 partials ⚠️
tdrs-backend/tdpservice/data_files/serializers.py 81.81% 1 Missing and 1 partial ⚠️
...mponents/SubmissionHistory/CaseAggregatesTable.jsx 0.00% 0 Missing and 1 partial ⚠️
...ponents/SubmissionHistory/TotalAggregatesTable.jsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3231      +/-   ##
===========================================
- Coverage    91.52%   91.49%   -0.04%     
===========================================
  Files          297      297              
  Lines         8415     8432      +17     
  Branches       608      611       +3     
===========================================
+ Hits          7702     7715      +13     
- Misses         603      604       +1     
- Partials       110      113       +3     
Flag Coverage Δ
dev-backend 91.35% <83.33%> (-0.02%) ⬇️
dev-frontend 92.51% <57.14%> (-0.16%) ⬇️

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

Files with missing lines Coverage Δ
tdrs-backend/tdpservice/settings/common.py 99.34% <100.00%> (+<0.01%) ⬆️
...components/SubmissionHistory/SubmissionHistory.jsx 100.00% <ø> (ø)
tdrs-frontend/src/reducers/reports.js 90.00% <ø> (ø)
...mponents/SubmissionHistory/CaseAggregatesTable.jsx 84.61% <0.00%> (+3.36%) ⬆️
...ponents/SubmissionHistory/TotalAggregatesTable.jsx 66.66% <0.00%> (ø)
tdrs-backend/tdpservice/data_files/serializers.py 96.29% <81.81%> (-3.71%) ⬇️
...ntend/src/components/SubmissionHistory/helpers.jsx 78.04% <66.66%> (-4.71%) ⬇️

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 53d3641...11abfb5. Read the comment docs.

Copy link

@elipe17 elipe17 left a comment

Choose a reason for hiding this comment

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

One comment, doesn't halt anything. LGTM

@victoriaatraft victoriaatraft added the Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI label Oct 15, 2024
@victoriaatraft
Copy link

LGTM @jtimpe
Screenshot 2024-10-15 at 11 24 48 AM

@jtimpe jtimpe added QASP Review and removed raft review This issue is ready for raft review a11y-review PR is ready for accessibility review labels Oct 15, 2024
@jtimpe jtimpe requested a review from ADPennington October 15, 2024 18:27
@ADPennington ADPennington removed the Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI label Oct 16, 2024
@ADPennington
Copy link
Collaborator

LGTM @jtimpe Screenshot 2024-10-15 at 11 24 48 AM

per standup today, @jtimpe noted that submitted by column is blank because his user's first and last name is blank in user profile.

@ADPennington ADPennington added the Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI label Oct 18, 2024
@jtimpe jtimpe added Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI and removed Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI labels Nov 8, 2024
@jtimpe jtimpe removed the Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI label Nov 13, 2024
@victoriaatraft victoriaatraft added the Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI label Nov 13, 2024
Copy link

@victoriaatraft victoriaatraft left a comment

Choose a reason for hiding this comment

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

LGTM

@victoriaatraft victoriaatraft removed the Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI label Nov 13, 2024
@jtimpe jtimpe added QASP Review and removed raft review This issue is ready for raft review labels Nov 13, 2024
@jtimpe jtimpe requested review from ADPennington, klinkoberstar and ttran-hub and removed request for ttran-hub, ADPennington and klinkoberstar November 13, 2024 18:03
@ADPennington ADPennington added the Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI label Nov 13, 2024
@ADPennington
Copy link
Collaborator

will test the following:

  • no banner
  • submitted on and submitted by merged into one column

anything else? @jtimpe (asking because i think the summary may now be outdated 😄 )

@jtimpe
Copy link
Author

jtimpe commented Nov 13, 2024

@ADPennington

* no banner
* submitted on and submitted by merged into one column

anything else? @jtimpe (asking because i think the summary may now be outdated 😄 )

  • the error report download link will also display regardless of if the file is outdated.
  • i also snuck in file.latest_reparse_meta to the api. so any changes we want to make to the frontend in the future (showing latest reprocessed date, for example) can be an easier change. it's not used anywhere currently, though

updated the description, thank you for calling that out!

class Meta:
"""Meta class."""

model = ReparseFileMeta
Copy link
Collaborator

Choose a reason for hiding this comment

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

✔️

Screenshot 2024-11-15 092322


<th scope="rowgroup" rowSpan={3}>
{file.submittedBy}
{formatDate(file.createdAt) + ' by ' + file.submittedBy}
Copy link
Collaborator

Choose a reason for hiding this comment

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

✔️

Screenshot 2024-11-15 092600


<th scope="rowgroup" rowSpan={3}>
{file.submittedBy}
{formatDate(file.createdAt) + ' by ' + file.submittedBy}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Screenshot 2024-11-15 091822_LI

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.

  • no banner

confirmed ✔️
Screenshot 2024-11-15 093441

  • submitted on and submitted by merged into one column
    confirmed ✔️
  • the error report download link will also display regardless of if the file is outdated.

confirmed ✔️

  • i also snuck in file.latest_reparse_meta to the api. so any changes we want to make to the frontend in the future (showing latest reprocessed date, for example) can be an easier change. it's not used anywhere currently, though

confirmed ✔️

@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 15, 2024
@jtimpe jtimpe merged commit 5500be8 into develop Nov 15, 2024
17 checks passed
@jtimpe jtimpe deleted the 3014-outdated-submissions-banner branch November 15, 2024 16:22
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.

Outdated info banner for submission history results with data processed before 5/31/24
8 participants