diff --git a/CHANGELOG.md b/CHANGELOG.md index d22db62faa..a34f8e2e2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ 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.150.1](https://github.com/opengovsg/FormSG/compare/v6.150.0...v6.150.1) + +- fix: radio button saving others despite not selected [`#7751`](https://github.com/opengovsg/FormSG/pull/7751) +- build: release v6.150.0 [`#7741`](https://github.com/opengovsg/FormSG/pull/7741) + #### [v6.150.0](https://github.com/opengovsg/FormSG/compare/v6.149.3...v6.150.0) +> 2 October 2024 + - fix: ordering of arguments for bounce service functions [`#7739`](https://github.com/opengovsg/FormSG/pull/7739) - build: merge v6.149.3 to develop [`#7740`](https://github.com/opengovsg/FormSG/pull/7740) - fix: logic active step padding (#7737) [`#7738`](https://github.com/opengovsg/FormSG/pull/7738) @@ -13,6 +20,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - chore: allow empty coveralls to pass [`#7726`](https://github.com/opengovsg/FormSG/pull/7726) - build: merge release v6.149.0 to develop [`#7727`](https://github.com/opengovsg/FormSG/pull/7727) - fix(deps): bump @joi/date from 2.1.0 to 2.1.1 [`#7723`](https://github.com/opengovsg/FormSG/pull/7723) +- chore: bump version to v6.150.0 [`5c5a215`](https://github.com/opengovsg/FormSG/commit/5c5a215d23f1f4f6e707bbb9cb33fc44b8688f15) - chore: bump version to 6.149.3 [`f427462`](https://github.com/opengovsg/FormSG/commit/f427462d3d7a6a24112063369416a7055e753ab1) #### [v6.149.3](https://github.com/opengovsg/FormSG/compare/v6.149.2...v6.149.3) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5a2f3e486b..2269f2d919 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "form-frontend", - "version": "6.150.0", + "version": "6.150.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "form-frontend", - "version": "6.150.0", + "version": "6.150.1", "hasInstallScript": true, "dependencies": { "@chakra-ui/react": "^1.8.6", diff --git a/frontend/package.json b/frontend/package.json index 5b05f600d5..0496aa8f2a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "form-frontend", - "version": "6.150.0", + "version": "6.150.1", "homepage": ".", "private": true, "dependencies": { diff --git a/frontend/src/features/public-form/utils/createSubmission.ts b/frontend/src/features/public-form/utils/createSubmission.ts index bff672d035..f550a7b617 100644 --- a/frontend/src/features/public-form/utils/createSubmission.ts +++ b/frontend/src/features/public-form/utils/createSubmission.ts @@ -25,6 +25,7 @@ import { FormFieldValue, FormFieldValues, } from '~templates/Field' +import { RADIO_OTHERS_INPUT_VALUE } from '~templates/Field/Radio/constants' import { FieldIdToQuarantineKeyType } from '../PublicFormService' @@ -364,12 +365,17 @@ const createResponsesV3 = ( const input = formInputs[ff._id] as | FormFieldValue | undefined - if (!input?.value && !input?.othersInput) break - returnedInputs[ff._id] = { - fieldType: ff.fieldType, - answer: input.othersInput - ? { othersInput: input.othersInput } - : { value: input.value }, + const isOthersSelected = input?.value === RADIO_OTHERS_INPUT_VALUE + if (!isOthersSelected && input?.value) { + returnedInputs[ff._id] = { + fieldType: ff.fieldType, + answer: { value: input.value }, + } + } else if (isOthersSelected && input?.othersInput) { + returnedInputs[ff._id] = { + fieldType: ff.fieldType, + answer: { othersInput: input.othersInput }, + } } break } diff --git a/package-lock.json b/package-lock.json index cabb42a181..1cd793575a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "FormSG", - "version": "6.150.0", + "version": "6.150.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "FormSG", - "version": "6.150.0", + "version": "6.150.1", "hasInstallScript": true, "dependencies": { "@aws-sdk/client-cloudwatch-logs": "^3.536.0", diff --git a/package.json b/package.json index 2a3aa6dd6a..9065f50eb3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "6.150.0", + "version": "6.150.1", "homepage": "https://form.gov.sg", "authors": [ "FormSG "