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

3802 - Ensure evidence based total spend value is derived from the most recent upload #3851

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

as1729
Copy link
Contributor

@as1729 as1729 commented Jan 3, 2025

Ticket #3802

Description

Some values in the ARPA audit report must be derived from the most recent upload-file rather than an aggregate of of all the upload-files.

In this case, we updated the Evidence Based Total Spend value in the KPI tab to reflect the new logic and take the most-recent value.

Screenshots / Demo Video

After

The latest value of $35,000 is being picked.
image

Before

The KPI tab is returning the summation of two values $100,000 and $35,000 to return $135,000.
image

Testing

  1. Retrieve the two uploads needed to test from this directory here: https://drive.google.com/drive/folders/1YCnXLi-j3k8m3qktKrt9MRf20B5YsUDD
  2. Upload both workbooks in the order FIRST_UPLOAD then SECOND_UPLOAD into the app through the Submit Workbook Flow. http://localhost:8080/arpa_reporter/new_upload
  3. Verify that both uploads are validated.
  4. In a separate tab hit this endpoint to synchronously generate the Audit Report: http://localhost:8080/api/audit_report
  5. Verify that the audit report reflects $35,000 when generated from the current branch.
  6. Switch to the main branch and run the same endpoint: http://localhost:8080/api/audit_report - This time verify that the audit report contains the value $135,000.

Automated and Unit Tests

  • Added Unit tests

Manual tests for Reviewer

  • Added steps to test feature/functionality manually

Checklist

  • Provided ticket and description
  • Provided screenshots/demo
  • Provided testing information
  • Provided adequate test coverage for all new code
  • Added PR reviewers

@as1729 as1729 linked an issue Jan 3, 2025 that may be closed by this pull request
@github-actions github-actions bot added the javascript Pull requests that update Javascript code label Jan 3, 2025
Copy link

github-actions bot commented Jan 3, 2025

Terraform Summary

Step Result
🖌 Terraform Format & Style
⚙️ Terraform Initialization
🤖 Terraform Validation
📖 Terraform Plan

Hint: If "Terraform Format & Style" failed, run terraform fmt -recursive from the terraform/ directory and commit the results.

Output

Validation Output
stdout:
Success! The configuration is valid.


-------------------------------------
stderr:

Plan Summary
CHANGE RESOURCE
update module.api.aws_ecs_service.default[0]
module.api.module.grant_digest_scheduled_task.aws_iam_role_policy.default[0]
module.api.module.grant_digest_scheduled_task.aws_scheduler_schedule.default[0]
module.arpa_audit_report.aws_ecs_service.default
module.arpa_treasury_report.aws_ecs_service.default
module.consume_grants.aws_ecs_service.default
module.website.aws_s3_object.deploy-config[0]
module.website.aws_s3_object.origin_dist_artifact["assets/style-BC_a0XFZ.js.map"]
recreate module.api.aws_ecs_task_definition.default[0]
module.arpa_audit_report.aws_ecs_task_definition.consumer
module.arpa_treasury_report.aws_ecs_task_definition.consumer
module.consume_grants.aws_ecs_task_definition.consume_grants

Pusher: @as1729, Action: pull_request_target, Workflow: Continuous Integration

Copy link

github-actions bot commented Jan 3, 2025

QA Summary

QA Check Result
🌐 Client Tests
🔗 Server Tests
🤝 E2E Tests
📏 ESLint
🧹 TFLint

Test Coverage

Coverage report for `packages/client`
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🔴 All files 37.3 37.21 33.92 38.9
🔴  src 0 100 100 0
🔴   App.vue 0 100 100 0 2-9
🔴  src/arpa_reporter 0 100 100 0
🔴   App.vue 0 100 100 0 2-13
🟡  ...ter/components 63 60 55.31 64.51
🟢   AlertBox.vue 100 100 100 100
🟡   ...oadButton.vue 60 55.55 37.5 60 7,60-67
🟢   ...ileButton.vue 100 100 100 100
🟢   ...ttonSmall.vue 100 100 100 100
🟢   ...mplateBtn.vue 100 100 100 100
🟡   ...avigation.vue 65.62 63.63 52.63 65.62 ...01-207,216-223
🔴   StandardForm.vue 45 50 41.66 45.45 ...25-129,136-158
🟢  ...porter/helpers 84.61 79.48 87.5 84.61
🟢   form-helpers.js 84.21 79.48 85.71 84.21 7,16,25,81-83
🟢   short-uuid.js 100 100 100 100
🔴  ...eporter/router 0 0 0 0
🔴   index.js 0 0 0 0 19-124
🔴  ...reporter/store 3.92 0 2.17 4.12
🔴   index.js 3.92 0 2.17 4.12 11-14,32-261
🔴  ...reporter/views 47.39 33.43 47.97 49.38
🟢   AgenciesView.vue 100 0 100 100 16
🔴   AgencyView.vue 40.74 36.36 50 45.83 53-62,70-96
🟢   HomeView.vue 93.47 90.24 100 93.47 114,147,180
🔴   LoginView.vue 29.62 36.36 20 30.76 1,6,21-36,74-102
🔴   ...plateView.vue 27.02 35.71 45.45 25 ...2,30-37,69-113
🔴   ...ploadView.vue 24.24 16.66 33.33 26.66 1,30-31,116-144
🔴   ...eriodView.vue 48 18.18 75 52.17 64-90
🟡   ...riodsView.vue 57.57 28.57 60 59.37 101,132,149-171
🔴   ...pientView.vue 40 10.52 30.76 41.02 73-93,110-152
🔴   ...ientsView.vue 48.48 8.33 46.66 53.33 ...46,165-190,203
🟡   UploadView.vue 61.95 43.75 62.5 61.79 ...42-443,449-450
🔴   UploadsView.vue 16.66 0 0 18.18 61,112-289
🔴   UserView.vue 46.34 33.33 68.75 48.64 84,97-137
🟡   UsersView.vue 60 7.69 62.5 66.66 91-92,105-107,123
🟡  src/components 54.7 44.55 55.47 55.42
🔴   ...vityTable.vue 18.75 0 28.57 19.35 115-185
🟡   BaseLayout.vue 69.56 53.84 60 69.56 172,219-231
🔴   CopyButton.vue 30 33.33 40 30 6,54-63
🟢   ...tActivity.vue 80.76 62.85 83.33 80.76 ...31-136,179,201
🟢   GrantNotes.vue 90 78.26 85 89.79 ...87,207,216-217
🔴   GrantsTable.vue 43.58 39.47 41.86 45.27 ...72-476,484-564
🔴   ...dUploader.vue 24.24 33.33 37.5 24.24 16,25,74-111
🔴   SearchFilter.vue 40.74 28 37.5 40 ...52,64,67,72-82
🔴   ShareGrant.vue 38.7 64.28 23.07 40 ...08-112,131-152
🟢   ...ivityItem.vue 96.15 90.9 100 96.15 64
🟡   UserAvatar.vue 70 75 100 62.5 35-37
🟢   ...eaderText.vue 100 100 100 100
🔴  ...ponents/Modals 29.21 44.34 33.1 32.94
🔴   ...anization.vue 17.39 65.62 30 22.22 1-14,149-178
🔴   AddTeam.vue 45.45 55.55 61.53 57.69 ...06,212,224-247
🔴   AddUser.vue 36.66 66.66 60 37.5 ...40,145,148-176
🔴   ...anization.vue 15.38 64.28 14.28 16.66 1-17,60-80
🔴   EditTeam.vue 18.18 26.43 33.33 20.83 ...32,211,219-304
🔴   EditUser.vue 21.05 66.66 25 22.22 1,102-129
🔴   ...ilsLegacy.vue 22.03 0 0 24.07 131,177,205-369
🟢   ...Followers.vue 83.33 88.88 57.14 83.33 10,114-115
🟡   ImportTeams.vue 50 41.17 50 53.33 28,64-69,81-82
🔴   ImportUsers.vue 42.85 60 40 46.15 29,65-80
🔴   ...archPanel.vue 27.9 15.78 23.52 28.57 ...68-178,211-255
🔴   SearchPanel.vue 21.62 63.26 32 27.58 ...77-380,386-458
🔴  src/helpers 18.12 17.92 18.6 18.88
🟢   constants.js 100 100 100 100
🟢   currency.js 100 100 100 100
🟡   dates.js 66.66 100 33.33 100
🔴   fetchApi.js 6 13.79 5.26 6.12 10-12,20-132
🔴   filters.js 4 0 0 4.54 19-51
🔴   form-helpers.js 0 0 0 0 5-82
🟡   gtag.js 77.77 90 75 77.77 12,51
🟢   testHelpers.js 100 100 100 100
🔴   ...patWarning.js 0 0 0 0 39-61
🟢  ...s/featureFlags 92.3 100 85.71 92.3
🟡   index.js 80 100 80 80 8
🟢   utils.js 100 100 100 100
🔴  src/mixin 20 0 28.57 20
🔴   ...zableTable.js 20 0 28.57 20 16-31,36-37,42
🔴  src/router 18.91 16.66 11.11 18.91
🔴   index.js 18.91 16.66 11.11 18.91 ...81-182,186-205
🟢  src/store 100 100 100 100
🟢   index.js 100 100 100 100
🔴  src/store/modules 2.82 0 4.48 2.94
🔴   agencies.js 5.26 100 8.33 5.55 13-70
🔴   alerts.js 20 100 20 20 10-24
🔴   grants.js 0.99 0 0.97 1.03 61-456
🔴   organization.js 33.33 100 33.33 33.33 21-25
🔴   roles.js 20 100 20 25 13-22
🔴   tenants.js 11.11 100 14.28 12.5 13-32
🔴   users.js 2.43 0 4.76 2.5 17-100
🔴  src/views 45.16 38.12 33.98 46.95
🔴   ...orterView.vue 25.58 51.85 18.18 26.82 ...,64,87,112-154
🟡   ...boardView.vue 50 17.64 50 52 89-98,114-125
🔴   ...tailsView.vue 32.97 14.28 17.07 33.69 ...98-437,443-464
🟢   GrantsView.vue 100 100 100 100
🟡   LoginView.vue 56 38.88 44.44 58.33 25,140-162
🟡   MyGrantsView.vue 73.33 85.71 62.5 73.33 1,80,91,99
🟡   ...ofileView.vue 78.26 80 42.85 78.26 1,32,63,136-140
🟢   NotFoundView.vue 100 100 100 100
🔴   ...tionsView.vue 47.05 57.14 41.66 53.33 ...97-100,114-118
🔴   ...ivityView.vue 46.42 23.8 43.75 46.42 ...01,114,120-134
🔴   TeamsView.vue 44.44 88.88 41.66 53.33 1,58,142,156-163
🟡   UsersView.vue 50 66.66 36.36 53.84 ...16-121,133-139
Coverage report for `packages/server`

Pusher: @as1729, Action: pull_request_target, Workflow: Continuous Integration

projectLogger.debug('populating row from records in project');
const row = {
'Project ID': projectId,
'Number of Subawards': 0,
'Number of Expenditures': 0,
'Evidence Based Total Spend': 0,
'Evidence Based Total Spend': mostRecentRecord?.content.Spending_Allocated_Toward_Evidence_Based_Interventions || 0,
Copy link
Contributor

@lsr-explore lsr-explore Jan 3, 2025

Choose a reason for hiding this comment

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

is content always guaranteed to be present? In the test data, the first record did not have a content.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good question - records that are filtered by type ec* should always have a content. Let me verify that this is the case and if not, I'll add something to check for the existence of content.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the latest bug- it seems prudent to add a check to make sure these fields are present. Since the data comes directly from the spreadsheets and the users can input anything they want there is no guarantee that all the data is fully available. I added these checks in the latest PR. #3863

@lsr-explore
Copy link
Contributor

Thanks for the quick responses @as1729 - I approved.

@as1729 as1729 merged commit 189d602 into main Jan 3, 2025
19 checks passed
@as1729 as1729 deleted the 3802-issue-audit-report-kpi-tab-field-updates branch January 3, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue]: Audit Report KPI Tab Field Updates
2 participants