From c5f2556c3dc3d5403a14d00e9402096c77cc0cbe Mon Sep 17 00:00:00 2001 From: Bidyashish <hi@bidyashish.com> Date: Tue, 22 Oct 2024 08:59:15 -0700 Subject: [PATCH] #3393 - Increase the Maximum Offering Name Character Limit to 100 Characters (#3800) **Technical** - [x] Change the form.io client-side validation. - [x] Change the [education-program-offering.model.ts](https://github.com/bcgov/SIMS/blob/e5b7ea01bf15f36271a9dae005a5e93b8998da7b/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts#L20) constant `OFFERING_NAME_MAX_LENGTH`. - [x] No DB changes expected. - [x] Check the above-mentioned UIs to ensure the 100-character offering names will be accommodated in the UI. Feel free to paste some screenshots to the ticket to allow the business to review it. Error Over 100 Character  Instituition Page:  Drop Down Section:  Offering Page:  Add Offering:  --- .../sims-db/src/entities/education-program-offering.model.ts | 4 ++-- .../forms/src/form-definitions/educationprogramoffering.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts b/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts index 06227eaf81..e0b5f74247 100644 --- a/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts +++ b/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts @@ -16,9 +16,9 @@ import { numericTransformer } from "@sims/sims-db/transformers/numeric.transform /** * Max value the offering name can have. By DB definition it is defined as - * 300 but from business perspective it should not be longer than 50. + * 300 but from business perspective it should not be longer than 100. */ -export const OFFERING_NAME_MAX_LENGTH = 50; +export const OFFERING_NAME_MAX_LENGTH = 100; export const OFFERING_WIL_TYPE_MAX_LENGTH = 50; /** diff --git a/sources/packages/forms/src/form-definitions/educationprogramoffering.json b/sources/packages/forms/src/form-definitions/educationprogramoffering.json index 51e540d5f7..1783376eba 100644 --- a/sources/packages/forms/src/form-definitions/educationprogramoffering.json +++ b/sources/packages/forms/src/form-definitions/educationprogramoffering.json @@ -317,7 +317,7 @@ "tableView": true, "validate": { "required": true, - "maxLength": 50, + "maxLength": 100, "custom": "", "customPrivate": false, "strictDateValidation": false,