Skip to content

Conversation

@dheepak-aot
Copy link
Collaborator

@dheepak-aot dheepak-aot commented Sep 26, 2025

DB Migration

  • Added a new column is_beta to the table sims.institution_locations to identify the beta institutions.

Rollback evidence

image

API

  • Updated the options API that returns list of designated institution locations to optionally receive a query parameter offeringIntensity to limit the results to beta institutions for full-time if the beta institutions flag is enabled.
  • Add a validation to submit application API to allow only beta institution location applications for full-time if the beta institutions flag is enabled.

New environment variable

  • New environment variable ALLOW_BETA_INSTITUTIONS_ONLY is added to the code and also to github variables in DEV.

@dheepak-aot dheepak-aot self-assigned this Sep 26, 2025
@dheepak-aot dheepak-aot changed the title #4726 - Institution based BETA #4726 - Institution based BETA - Backend Sep 26, 2025
@dheepak-aot dheepak-aot marked this pull request as ready for review September 26, 2025 21:33
@dheepak-aot dheepak-aot added SIMS-Api SIMS-Api DB DB migration involved Devops Devops labels Sep 26, 2025
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-based BETA functionality for the backend system, allowing the restriction of full-time application submissions to designated beta institutions only when the feature flag is enabled.

  • Adds a new database column is_beta_institution to track beta institution status
  • Implements validation logic to restrict full-time applications to beta institutions when the feature flag is active
  • Updates APIs to filter institution options based on beta status for full-time offerings

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sources/packages/backend/libs/sims-db/src/entities/institution-location.model.ts Adds isBetaInstitution boolean column to the InstitutionLocation entity
sources/packages/backend/apps/db-migrations/src/migrations/1758903872348-InstitutionLocationsAddColIsBetaInstitution.ts Database migration to add the beta institution column
sources/packages/backend/libs/utilities/src/config/config.service.ts Adds configuration property for the beta institutions feature flag
sources/packages/backend/apps/api/src/services/application/application.service.ts Implements validation logic to restrict applications to beta institutions
sources/packages/backend/apps/api/src/route-controllers/institution-locations/institution-location.students.controller.ts Updates options API to filter beta institutions based on offering intensity
sources/packages/backend/apps/api/src/services/institution-location/institution-location.service.ts Adds beta institution filtering to designated locations query
Multiple deployment files Adds ALLOW_BETA_INSTITUTIONS_ONLY environment variable configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +40 to +41
@Query("offeringIntensity", new ParseEnumQueryPipe(OfferingIntensity))
offeringIntensity?: OfferingIntensity,
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

The new query parameter offeringIntensity lacks API documentation. Consider adding OpenAPI decorators like @ApiQuery() to document this optional parameter, its purpose, and possible values for API consumers.

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

Great work, looks good 👍

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 21.34% ( 4174 / 19560 )
Methods: 9.59% ( 239 / 2493 )
Lines: 24.7% ( 3615 / 14633 )
Branches: 13.15% ( 320 / 2434 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 75.33% ( 974 / 1293 )
Methods: 78.08% ( 114 / 146 )
Lines: 78.25% ( 759 / 970 )
Branches: 57.06% ( 101 / 177 )

@sonarqubecloud
Copy link

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.

Reviewed after column renamed to is_beta, looks good 👍

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 86.43% ( 1548 / 1791 )
Methods: 84.62% ( 176 / 208 )
Lines: 88.75% ( 1278 / 1440 )
Branches: 65.73% ( 94 / 143 )

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 74.64% ( 7654 / 10255 )
Methods: 72.56% ( 936 / 1290 )
Lines: 78.09% ( 5926 / 7589 )
Branches: 57.56% ( 792 / 1376 )

@dheepak-aot dheepak-aot added this pull request to the merge queue Sep 26, 2025
Merged via the queue into main with commit 5f201fe Sep 26, 2025
22 checks passed
@dheepak-aot dheepak-aot deleted the feature/#4726-insttitution-based-beta branch September 26, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DB DB migration involved Devops Devops SIMS-Api SIMS-Api

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants