-
Notifications
You must be signed in to change notification settings - Fork 13
#5016 - Institution restrictions - ECert validations #5573
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
#5016 - Institution restrictions - ECert validations #5573
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.
Pull request overview
This PR implements institution restriction validations for ECert processing, preventing disbursements when an institution has active "StopFullTimeDisbursement" or "StopPartTimeDisbursement" restrictions for specific programs and locations. The implementation adds backend validation logic, updates the UI with appropriate warning banners, and includes comprehensive e2e test coverage.
Key Changes
- Added new
InstitutionActiveRestrictionmodel and validation logic to check institution-level restrictions during ECert processing - Introduced
HasStopDisbursementInstitutionRestrictionvalidation type that blocks disbursements when effective institution restrictions exist - Updated UI components and FormIO forms to display warning banners when programs are restricted by StudentAid BC
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
disbursement-schedule.models.ts |
Added InstitutionActiveRestriction interface, updated EligibleECertDisbursement class to handle institution restrictions, added mapping function for institution restrictions |
e-cert-generation.service.ts |
Extended query to include institution restrictions with program/location joins, added logic to group and pass institution restrictions to disbursements |
validate-disbursement-full-time-step.ts |
Added validation to check for effective institution restrictions with StopFullTimeDisbursement action |
validate-disbursement-part-time-step.ts |
Added validation to check for effective institution restrictions with StopPartTimeDisbursement action, added return type to CSLP validation method |
e-cert-steps-utils.ts |
Added getInstitutionRestrictionsByActionType function and refactored common restriction filtering logic into hasEffectiveRestrictionAction |
e-cert-pre-validation-service-models.ts |
Added new institution restriction validation to the list of blocking validations |
NoticeOfAssessment.vue |
Added handling for institution restriction validation to show appropriate warning message to students |
ECertFailedValidation.ts |
Added new enum value for institution restriction validation |
ecert-constants.ts |
Added user-facing message for institution restriction failed validation |
sfaa2026-27-pt.json |
Added warning banner for restricted programs and hidden fields to track institution restrictions |
sfaa2026-27-ft.json |
Added warning banner for restricted programs and hidden fields to track institution restrictions |
ecert-part-time-process-integration.scheduler.e2e-spec.ts |
Added e2e tests for institution restrictions blocking disbursements, updated MSFAA creation to specify offering intensity, improved function return type |
ecert-full-time-process-integration.scheduler.e2e-spec.ts |
Added e2e test for institution restrictions blocking full-time disbursements, updated MSFAA creation to specify offering intensity |
application.students.controller.getCompletedApplicationDetails.e2e-spec.ts |
Added e2e test verifying institution restriction appears in application details |
application.students.controller.getApplicationWarnings.e2e-spec.ts |
Added e2e test verifying institution restriction appears in application warnings |
|
|
||
| /** | ||
| * Helper function to get the uploaded file name. | ||
| * @returns The uploaded file name |
Copilot
AI
Jan 5, 2026
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.
The return type annotation was added to this function. While this is an improvement, note that the JSDoc comment should also end with a period after "file name" for consistency with project standards.
| * @returns The uploaded file name | |
| * @returns The uploaded file name. |
| * Check active institution restrictions by its action type in an eligible disbursement. | ||
| * @param eCertDisbursement disbursement to check institution restrictions. | ||
| * @param actionType action type. | ||
| * @returns the all the effective restrictions of the requested action type. |
Copilot
AI
Jan 5, 2026
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.
The return description has a grammatical error. It should be "all the effective restrictions" rather than "the all the effective restrictions".
...llers/application/_tests_/application.students.controller.getApplicationWarnings.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...plication/_tests_/application.students.controller.getCompletedApplicationDetails.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...egration/ecert-integration/_tests_/ecert-full-time-process-integration.scheduler.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...egration/ecert-integration/_tests_/ecert-full-time-process-integration.scheduler.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...egration/ecert-integration/_tests_/ecert-part-time-process-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
...egration/ecert-integration/_tests_/ecert-part-time-process-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
...backend/libs/integrations/src/services/disbursement-schedule/disbursement-schedule.models.ts
Show resolved
Hide resolved
...es/backend/libs/integrations/src/services/disbursement-schedule/e-cert-generation.service.ts
Show resolved
Hide resolved
...ntegrations/src/services/disbursement-schedule/e-cert-processing-steps/e-cert-steps-utils.ts
Outdated
Show resolved
Hide resolved
...rvices/disbursement-schedule/e-cert-processing-steps/validate-disbursement-full-time-step.ts
Outdated
Show resolved
Hide resolved
andrewsignori-aot
left a comment
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, please take a look at the comments.
| validationResults.push({ | ||
| resultType: ECertFailedValidation.HasStopDisbursementRestriction, | ||
| additionalInfo: { | ||
| restrictionCodes: stopDisbursementRestrictions.map( |
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.
Will this student-specific additionalInfo potentially contain institution restriction codes?
Since we have specific result types, I believe each result type should list its restriction codes. Does it make sense?
| /** | ||
| * Restriction is applied to a student. | ||
| */ | ||
| restrictedParty: RestrictedParty.Institution; |
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.
This type of implementation does not seem suitable for an interface, and I would recommend switching to a class where restrictedParty can be a read-only property set at the constructor.
Defining a property with an enum value and later needing to assign it again supports the idea of moving it to a class.
andrewsignori-aot
left a comment
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, please take a look at the most recent comments.
|
andrewsignori-aot
left a comment
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 and the extra effort for looking into the different ways to represents the ActiveRestriction abstraction to accommodate the students and instructions restrictions. It looks great 👍
sh16011993
left a comment
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 @dheepak-aot 👍



Institution restrictions - ECert validations
ECert validations
institutionRestrictionstoEligibleECertDisbursementto receive all active institution restrictions.getEffectiveInstitutionRestrictionsto return the effective institution restrictions that are as of now effective for program and location of the offering.ECertFailedValidationtypeHasStopDisbursementInstitutionRestrictionfor institution having an effective stop disbursement restriction.UI - Warning banners
E2E Tests
FormIO