-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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);
There was a problem hiding this 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.
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this 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); |
There was a problem hiding this comment.
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`, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👍
...processors/schedulers/institution-integration/ier12-integration/_tests_/e2e/ier12-factory.ts
Show resolved
Hide resolved
const currentOfferingId = numberToText( | ||
application.currentAssessment.offering.id, | ||
); | ||
const [offering] = await db.educationProgramOffering.find({ |
There was a problem hiding this comment.
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`, |
There was a problem hiding this comment.
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.
Kudos, SonarCloud Quality Gate passed!
|
There was a problem hiding this 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 👍
Red - current offering ID,
Yellow - parent offering ID
blue - 30 white space
"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.