diff --git a/CHANGELOG.md b/CHANGELOG.md index 4574a6d186..d756a4105f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,47 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v6.166.1](https://github.com/opengovsg/FormSG/compare/v6.166.1...v6.166.1) + +- fix: trim previous text responses [`#7949`](https://github.com/opengovsg/FormSG/pull/7949) + +#### [v6.166.1](https://github.com/opengovsg/FormSG/compare/v6.166.0...v6.166.1) + +> 27 November 2024 + +- build: release v6.166.0 [`#7945`](https://github.com/opengovsg/FormSG/pull/7945) +- chore: bump version to v6.166.1 [`18d9c74`](https://github.com/opengovsg/FormSG/commit/18d9c74cde8739bc96a0833f3764cb518e4e34aa) + +#### [v6.166.0](https://github.com/opengovsg/FormSG/compare/v6.165.0...v6.166.0) + +> 26 November 2024 + +- feat(mrf): conditional routing [`#7804`](https://github.com/opengovsg/FormSG/pull/7804) +- fix: trim text input before sending to backend [`#7937`](https://github.com/opengovsg/FormSG/pull/7937) +- test(story): add chromatic story to ensure thankyou page renders [`#7264`](https://github.com/opengovsg/FormSG/pull/7264) +- chore: remove unused deps [`#7906`](https://github.com/opengovsg/FormSG/pull/7906) +- feat(i18n): extract text from admin-form prompts [`#7931`](https://github.com/opengovsg/FormSG/pull/7931) +- fix(deps): bump libphonenumber-js from 1.11.14 to 1.11.15 in /shared [`#7936`](https://github.com/opengovsg/FormSG/pull/7936) +- chore(deps-dev): bump @playwright/test from 1.45.1 to 1.49.0 [`#7923`](https://github.com/opengovsg/FormSG/pull/7923) +- chore(FE): cleanup date check on sex field [`#7922`](https://github.com/opengovsg/FormSG/pull/7922) +- chore(FE): use consistent vite port for dev with README [`#7930`](https://github.com/opengovsg/FormSG/pull/7930) +- feat(i18n): move workspace relative date format [`#7929`](https://github.com/opengovsg/FormSG/pull/7929) +- build: release v6.165.0 [`#7928`](https://github.com/opengovsg/FormSG/pull/7928) +- build: release v6.165.0 [`#7927`](https://github.com/opengovsg/FormSG/pull/7927) +- feat(i18n): extract text for form metadata [`#7926`](https://github.com/opengovsg/FormSG/pull/7926) +- chore: bump version to v6.166.0 [`c51e807`](https://github.com/opengovsg/FormSG/commit/c51e8074cce5ca0d5ac3ae4904e1c48ee94f5ec0) + #### [v6.165.0](https://github.com/opengovsg/FormSG/compare/v6.164.0...v6.165.0) +> 20 November 2024 + - chore(approvals-ga): remove beta flag for MRF email notifications and approvals [`#7920`](https://github.com/opengovsg/FormSG/pull/7920) - chore(deps-dev): bump @typescript-eslint/parser from 8.14.0 to 8.15.0 in /shared [`#7911`](https://github.com/opengovsg/FormSG/pull/7911) - fix(deps): bump @aws-sdk/client-lambda from 3.654.0 to 3.693.0 [`#7910`](https://github.com/opengovsg/FormSG/pull/7910) - chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.14.0 to 8.15.0 in /shared [`#7912`](https://github.com/opengovsg/FormSG/pull/7912) - build: merge release v6.164.0 to develop [`#7921`](https://github.com/opengovsg/FormSG/pull/7921) - build: release v6.164.0 [`#7919`](https://github.com/opengovsg/FormSG/pull/7919) +- chore: bump version to v6.165.0 [`7984ee9`](https://github.com/opengovsg/FormSG/commit/7984ee906d7c6eef156a15569694f9c6784f9e8a) #### [v6.164.0](https://github.com/opengovsg/FormSG/compare/v6.163.0...v6.164.0) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d316d0dcb9..90b19b352f 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "form-frontend", - "version": "6.165.0", + "version": "6.166.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "form-frontend", - "version": "6.165.0", + "version": "6.166.1", "hasInstallScript": true, "dependencies": { "@chakra-ui/react": "^2.8.2", diff --git a/frontend/package.json b/frontend/package.json index adbf2695fa..c38bee151d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "form-frontend", - "version": "6.165.0", + "version": "6.166.1", "homepage": ".", "type": "module", "private": true, diff --git a/package-lock.json b/package-lock.json index a299e4380e..c376047e1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "FormSG", - "version": "6.165.0", + "version": "6.166.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "FormSG", - "version": "6.165.0", + "version": "6.166.1", "hasInstallScript": true, "dependencies": { "@aws-sdk/client-cloudwatch-logs": "^3.536.0", diff --git a/package.json b/package.json index 2341cee8d9..26158fd167 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "6.165.0", + "version": "6.166.1", "homepage": "https://form.gov.sg", "authors": [ "FormSG " diff --git a/src/app/modules/submission/multirespondent-submission/multirespondent-submission.middleware.ts b/src/app/modules/submission/multirespondent-submission/multirespondent-submission.middleware.ts index 262df4b396..728f5b6841 100644 --- a/src/app/modules/submission/multirespondent-submission/multirespondent-submission.middleware.ts +++ b/src/app/modules/submission/multirespondent-submission/multirespondent-submission.middleware.ts @@ -485,6 +485,17 @@ export const validateMultirespondentSubmission = async ( const incomingResField = req.body.responses[fieldId] const prevResField = previousResponses[fieldId] + if ( + prevResField.fieldType === BasicField.ShortText || + prevResField.fieldType === BasicField.LongText + ) { + // NOTE: LEGACY ISSUE + // Since text fields were saved without trimming prior to https://github.com/opengovsg/FormSG/pull/7937. + // Without this, isFieldResponseV3Equal fails since the prevResField was not trimmed, + // causing a mismatch between the newly trimmed incomingResField. + prevResField.answer = prevResField.answer.trim() + } + const resp = isFieldResponseV3Equal( incomingResField, prevResField,