Skip to content

Conversation

@dheepak-aot
Copy link
Collaborator

@dheepak-aot dheepak-aot commented Jan 2, 2026

Institution restrictions - ECert validations

ECert validations

  • Updated the query to get eligible disbursements to include active institution restrictions and also the program and location of the offering.
  • Added a new property institutionRestrictions to EligibleECertDisbursement to receive all active institution restrictions.
  • Added a method getEffectiveInstitutionRestrictions to return the effective institution restrictions that are as of now effective for program and location of the offering.
  • Added a new ECertFailedValidation type HasStopDisbursementInstitutionRestriction for institution having an effective stop disbursement restriction.
  • Both the full-time and part-time validate step updated to check for effective institution restrictions.
image

UI - Warning banners

  • Updated the warning banner during accepting assessment.
image image
  • Waring banner when disbursement is blocked.
image

E2E Tests

  • Queue consumers E2E Tests
Scheduler queue processor for part-time-e-cert-integration.
    √ Should block the disbursement and log the information when the institution has an effective institution restriction for the application location and program with action type Stop part time disbursement. (2534 ms)                                                                                                                                                                                                                        
    √ Should create the e-Cert and log the information when the institution does not have an effective institution restriction for the application location and program with action type Stop part time disbursement. (1705 ms)

Scheduler queue processor for full-time-e-cert-integration.
    √ Should block the disbursement and log the information when the institution has an effective institution restriction for the application location and program with action type Stop full time disbursement. (1715 ms)
  • API E2E Tests
ApplicationStudentsController(e2e)-getCompletedApplicationDetails
    √ Should get application details with ecert failed validations array having stop disbursement institution restriction when there are is an effective restriction on institution account for the application location and program and the offering intensity is part-time. (1968 ms)

ApplicationStudentsController(e2e)-getApplicationWarnings
    √ Should return a failed ecert validations array with stop disbursement institution restriction when there are is an effective restriction on institution account for the application location and program and the offering intensity is part-time. (1530 ms)

FormIO

  • As new program year setup was done for PY 2026-27 updated the SFAA forms with latest logic.

@dheepak-aot dheepak-aot self-assigned this Jan 2, 2026
@dheepak-aot dheepak-aot marked this pull request as ready for review January 5, 2026 21:06
Copy link
Contributor

Copilot AI left a 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 InstitutionActiveRestriction model and validation logic to check institution-level restrictions during ECert processing
  • Introduced HasStopDisbursementInstitutionRestriction validation 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
Copy link

Copilot AI Jan 5, 2026

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.

Suggested change
* @returns The uploaded file name
* @returns The uploaded file name.

Copilot uses AI. Check for mistakes.
* 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.
Copy link

Copilot AI Jan 5, 2026

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".

Copilot uses AI. Check for mistakes.
@sh16011993 sh16011993 self-requested a review January 5, 2026 21:33
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, please take a look at the comments.

validationResults.push({
resultType: ECertFailedValidation.HasStopDisbursementRestriction,
additionalInfo: {
restrictionCodes: stopDisbursementRestrictions.map(
Copy link
Collaborator

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;
Copy link
Collaborator

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.

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, please take a look at the most recent comments.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 6, 2026

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.3% ( 4323 / 21298 )
Methods: 9.66% ( 252 / 2609 )
Lines: 24.45% ( 3705 / 15155 )
Branches: 10.36% ( 366 / 3534 )

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 75.41% ( 1055 / 1399 )
Methods: 79.31% ( 115 / 145 )
Lines: 78.79% ( 769 / 976 )
Branches: 61.51% ( 171 / 278 )

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 85.68% ( 1616 / 1886 )
Methods: 85% ( 187 / 220 )
Lines: 88.64% ( 1287 / 1452 )
Branches: 66.36% ( 142 / 214 )

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

E2E SIMS API Coverage Report

Totals Coverage
Statements: 75.57% ( 8582 / 11357 )
Methods: 75.59% ( 1028 / 1360 )
Lines: 79.64% ( 6235 / 7829 )
Branches: 60.84% ( 1319 / 2168 )

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 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 👍

Copy link
Collaborator

@sh16011993 sh16011993 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 @dheepak-aot 👍

@dheepak-aot dheepak-aot added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit 5f4a81c Jan 6, 2026
22 checks passed
@dheepak-aot dheepak-aot deleted the feature/#5016-institution-restriction-sus-ecert branch January 6, 2026 22:52
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.

4 participants