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

Fix IER12 bug - Allow zero grants #2373

Closed
2 tasks
JasonCTang opened this issue Oct 3, 2023 · 0 comments
Closed
2 tasks

Fix IER12 bug - Allow zero grants #2373

JasonCTang opened this issue Oct 3, 2023 · 0 comments
Assignees
Labels
Bug Something isn't working

Comments

@JasonCTang
Copy link
Collaborator

JasonCTang commented Oct 3, 2023

Describe the Bug
IER12 job fails if application(s) do not contain at least 1 grant.

Expected Behaviour
IER12 job should be able to pick up an application and create a record in the file even if there are no grants.

Actual Behaviour
When running the IER12 job with applications that contain no grants, the job fails and fails with the following error:
TypeError: Reduce of empty array with no initial value
at Array.reduce ()
at IER12IntegrationService.getSumOfAwards (/opt/app-root/src/dist/apps/queue-consumers/main.js:14723:14)
at /opt/app-root/src/dist/apps/queue-consumers/main.js:14599:43
at Array.map ()
at IER12IntegrationService.createIER12FileContent (/opt/app-root/src/dist/apps/queue-consumers/main.js:14556:42)
at IER12ProcessingService.uploadIER12Content (/opt/app-root/src/dist/apps/queue-consumers/main.js:14354:62)
at IER12ProcessingService.processIER12File (/opt/app-root/src/dist/apps/queue-consumers/main.js:14342:52)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async IER12IntegrationScheduler.processIER12File (/opt/app-root/src/dist/apps/queue-consumers/main.js:13993:31)

** Steps To Reproduce**
Steps to reproduce the behaviour:

  1. Create application with no grant award types. (Use income over $100,000 and no disability for single independent student) and submitted for any non BC Public institution.
  2. Go to https://test-aest-sims.apps.silver.devops.gov.bc.ca/admin/queues/queue/ier12-integration?status=failed and promote the job to run.
  3. View the failed tab.
  4. See error

Acceptance Criteria

  • Implement the code fix on reduce to have initial value
  • Test the fix by submitting an application which does not produce any grant as mentioned above
@JasonCTang JasonCTang added the Bug Something isn't working label Oct 3, 2023
@dheepak-aot dheepak-aot self-assigned this Oct 5, 2023
dheepak-aot added a commit that referenced this issue Oct 5, 2023
IER fix allow zero grants
@michesmith michesmith added this to the 2.0 Part-Time Students MVP milestone May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants