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

#2350 - Add Offering details (current and parent id) into IER-12 #2480

Merged
merged 7 commits into from
Nov 7, 2023

Conversation

ann-aot
Copy link
Contributor

@ann-aot ann-aot commented Nov 6, 2023

  • Added current offering ID, parent offering ID, and 30 white spaces as per the ticket.
    image
    Red - current offering ID,
    Yellow - parent offering ID
    blue - 30 white space
  • Added these new fields and updated the indexes in the spreadsheet.
  • Adjusted the IER12 TCs,
  • Updated "Should generate an IER12 file with one record for a student with one sent disbursement that had some funds withheld due to a restriction (DISW)." TC to accommodate both current and parent offering id logic.

Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

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

Looks good!

record.appendWithStartFiller(this.currentOfferingId, 10, NUMBER_FILLER);
record.appendOptionalNumberWithFiller(this.parentOfferingId, 10);
// Currently we are sending 30 whitespace after the parent offering id.
record.appendWithEndFiller("", 30, SPACE_FILLER);
Copy link
Collaborator

Choose a reason for hiding this comment

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

For filler, we can use record.repeatAppend(SPACE_FILLER, 30);

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

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

Nice work but please keep in mind that all E2E validating the uploaded files will start to fail till they are adjusted with these new data. It must be part of this PR.

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

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

LGTM, nice work @ann-aot

record.appendWithStartFiller(this.currentOfferingId, 10, NUMBER_FILLER);
record.appendOptionalNumberWithFiller(this.parentOfferingId, 10);
// Currently we are sending 30 whitespace after the parent offering id.
record.repeatAppend(SPACE_FILLER, 30);
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

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

Looks Good 👍

@@ -195,6 +197,10 @@ export class IER12FileDetail implements IER12FileLine {
record.appendOptionalStringWithFiller(this.sabcCode, 4);
record.appendOptionalStringWithFiller(this.institutionProgramCode, 25);
record.append(this.programLength, 1);
record.appendWithStartFiller(this.currentOfferingId, 10, NUMBER_FILLER);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We also have an appendNumberWithFiller for numbers, can you please replace it?

// Line 1 validations.
const firstDisbursementId = numberToText(firstDisbursement.id);
expect(line1).toBe(
`${assessmentId}${firstDisbursementId}${defaultApplicationNumber}A1B2C3D4 242963189Doe John 19980113B SI Address Line 1 Address Line 2 Victoria BC Z1Z1Z1 Program Program description undergraduateCertificate 0001 8 0512123401234ADR1 62000081620001205000033330000004444000000555500000066660050100F2000060120002001COMP20000601000010000000015161000008040500N NNN 20000602 000166429600000000000001664296000000000000000000001NNN000000000000000000000000000000000000000000000000000000000000NN0000000000000144430000000000000000000000000000000000007777000000336667000009874600000000000000000000000000000000000000000000002200000120000100023789650009656600 0000000000000000000000000000000000000000000000000000000000000000000000DISS2000081520000815Completed Sent 20000816 CSLF0000100000BCSL0000000000CSGP0000200000CSGD0000300000CSGF0000400000CSGT0000500000BCAG0000700000SBSD0000900000BGPD0000800000 0000000000`,
`${assessmentId}${firstDisbursementId}${defaultApplicationNumber}A1B2C3D4 242963189Doe John 19980113B SI Address Line 1 Address Line 2 Victoria BC Z1Z1Z1 Program Program description undergraduateCertificate 0001 8 0512123401234ADR1 6${parentOfferingId}0000000000 2000081620001205000033330000004444000000555500000066660050100F2000060120002001COMP20000601000010000000015161000008040500N NNN 20000602 000166429600000000000001664296000000000000000000001NNN000000000000000000000000000000000000000000000000000000000000NN0000000000000144430000000000000000000000000000000000007777000000336667000009874600000000000000000000000000000000000000000000002200000120000100023789650009656600 0000000000000000000000000000000000000000000000000000000000000000000000DISS2000081520000815Completed Sent 20000816 CSLF0000100000BCSL0000000000CSGP0000200000CSGD0000300000CSGF0000400000CSGT0000500000BCAG0000700000SBSD0000900000BGPD0000800000 0000000000`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not following why only ${parentOfferingId} was needed here. The offeringId is not needed also?
Besides that, the position is offeringId and the parentOfferingId, right? I was not able to see both but maybe I am missing something. Please let me know.

Copy link
Contributor Author

@ann-aot ann-aot Nov 7, 2023

Choose a reason for hiding this comment

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

My bad, its the current offering ID, I misnamed it. I will rename it. NIce catch 👍

const currentOfferingId = numberToText(
application.currentAssessment.offering.id,
);
const [offering] = await db.educationProgramOffering.find({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use the findOne to avoid the array destructor?

// Line 1 validations.
const firstDisbursementId = numberToText(firstDisbursement.id);
expect(line1).toBe(
`${assessmentId}${firstDisbursementId}${defaultApplicationNumber} 242963189Doe John 19980113B MA Address Line 1 Address Line 2 Victoria BC Z1Z1Z1 Program Program description undergraduateCertificate 0001 8 0512123401234ADR1 62000081620001010000033330000004444000000555500000066660019100F2000060120002001COMP20000601000010000000006598000000032400N NNN 20000602 000966867900000000000009668679003002001003000003005NNY000000000000000000000000000000000000000000000000000000000000NY0000000000000144430000000000000000000000000000000000007777000000150056000000000000000000000000000000000000000000003000000000050000000065430000009876120000792200 0000000000000000000000000000000000000000000000000000000000000000000000DISW2000081520000815Completed Sent 20000816 CSLF0000100000BCSL0000659800CSGP0000000000CSGD0000000000CSGF0000000000CSGT0000000000BCAG0000032400SBSD0000000000BGPD0000000000 0000000000`,
`${assessmentId}${firstDisbursementId}${defaultApplicationNumber} 242963189Doe John 19980113B MA Address Line 1 Address Line 2 Victoria BC Z1Z1Z1 Program Program description undergraduateCertificate 0001 8 0512123401234ADR1 6${currentOfferingId}${parentOfferingId} 2000081620001010000033330000004444000000555500000066660019100F2000060120002001COMP20000601000010000000006598000000032400N NNN 20000602 000966867900000000000009668679003002001003000003005NNY000000000000000000000000000000000000000000000000000000000000NY0000000000000144430000000000000000000000000000000000007777000000150056000000000000000000000000000000000000000000003000000000050000000065430000009876120000792200 0000000000000000000000000000000000000000000000000000000000000000000000DISW2000081520000815Completed Sent 20000816 CSLF0000100000BCSL0000659800CSGP0000000000CSGD0000000000CSGF0000000000CSGT0000000000BCAG0000032400SBSD0000000000BGPD0000000000 0000000000`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

{currentOfferingId}${parentOfferingId} ❤️
Thanks for taking care of it.

Copy link

sonarqubecloud bot commented Nov 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

github-actions bot commented Nov 7, 2023

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 18.17% ( 2341 / 12887 )
Methods: 9.28% ( 151 / 1628 )
Lines: 20.68% ( 2016 / 9749 )
Branches: 11.52% ( 174 / 1510 )

Copy link

github-actions bot commented Nov 7, 2023

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 76.94% ( 564 / 733 )
Methods: 71.59% ( 63 / 88 )
Lines: 78.75% ( 493 / 626 )
Branches: 42.11% ( 8 / 19 )

Copy link

github-actions bot commented Nov 7, 2023

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 52.62% ( 341 / 648 )
Methods: 50% ( 40 / 80 )
Lines: 56.85% ( 282 / 496 )
Branches: 26.39% ( 19 / 72 )

Copy link

github-actions bot commented Nov 7, 2023

E2E SIMS API Coverage Report

Totals Coverage
Statements: 55.53% ( 4084 / 7354 )
Methods: 52.88% ( 505 / 955 )
Lines: 60.25% ( 3310 / 5494 )
Branches: 29.72% ( 269 / 905 )

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes, looks good 👍

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.

5 participants