-
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
#4101 - SIMS to SFAS Bridge - Legacy Restrictions #4158
#4101 - SIMS to SFAS Bridge - Legacy Restrictions #4158
Conversation
andrepestana-aot
commented
Dec 19, 2024
•
edited
Loading
edited
- Filtered legacy restrictions that are going to be sent to SFAS;
- Formatted restriction field to have a minimum of 10 characters in the file;
- Added a legacy restriction to the e2e test.
...nd/libs/integrations/src/sfas-integration/sims-sfas-files/sims-to-sfas-restriction-record.ts
Outdated
Show resolved
Hide resolved
@@ -824,7 +844,10 @@ describe(describeProcessorRootTest(QueueNames.SIMSToSFASIntegration), () => { | |||
: " "; | |||
return `400${studentId.toString().padStart(10, "0")}${studentRestriction.id | |||
.toString() | |||
.padStart(10, "0")}${restriction.restrictionCode}${formatDate( | |||
.padStart(10, "0")}${restriction.restrictionCode.padEnd( |
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.
👍
application, | ||
restriction: legacyRestriction, | ||
}); | ||
|
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.
Please set the updated date of legacy restriction to fall under the delta period using simsDataUpdatedDate
// Student has a legacy restriction that should be ignored.
const legacyStudentRestriction = await saveFakeStudentRestriction(
db.dataSource,
{
student,
application,
restriction: legacyRestriction,
},
);
await db.studentRestriction.update(
{
id: legacyStudentRestriction.id,
},
{
updatedAt: simsDataUpdatedDate,
},
);
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. I didn't see that it was set in the save.
But also please use the factory to create restriction createFakeRestriction
instead of saving it directly.
@@ -234,6 +234,7 @@ export class SIMSToSFASService { | |||
where: { | |||
restriction: { | |||
restrictionType: RestrictionType.Provincial, | |||
isLegacy: false, |
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.
👍
@@ -35,7 +35,7 @@ export class SIMSToSFASRestrictionRecord extends SIMSToSFASBaseRecord { | |||
record.append(this.recordTypeCode); | |||
record.appendNumberWithFiller(this.studentId, 10); | |||
record.appendNumberWithFiller(this.restrictionId, 10); | |||
record.append(this.restrictionCode); | |||
record.appendStringWithFiller(this.restrictionCode, 10); |
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.
LGTM, nice work @andrepestana-aot
|
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 @andrepestana-aot .👍