Skip to content

Commit

Permalink
Merge pull request #7657 from opengovsg/release-v6.146.1
Browse files Browse the repository at this point in the history
build: release v6.146.1
  • Loading branch information
KenLSM authored Sep 10, 2024
2 parents bda14ee + cfc3ebd commit c0b2172
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ 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.146.1](https://github.com/opengovsg/FormSG/compare/v6.146.0...v6.146.1)

- fix(MRF): disable hasBeenScanned [`#7652`](https://github.com/opengovsg/FormSG/pull/7652)
- build: release v6.146.0 [`#7644`](https://github.com/opengovsg/FormSG/pull/7644)

#### [v6.146.0](https://github.com/opengovsg/FormSG/compare/v6.145.0...v6.146.0)

> 4 September 2024

- build: merge release to develop [`#7643`](https://github.com/opengovsg/FormSG/pull/7643)
- feat: email notifications for mrf completed workflows [`#7597`](https://github.com/opengovsg/FormSG/pull/7597)
- build: release v6.145.0 [`#7637`](https://github.com/opengovsg/FormSG/pull/7637)
- chore: bump version to v6.146.0 [`7cc7d92`](https://github.com/opengovsg/FormSG/commit/7cc7d9235636d7a6b55f32d6e7214ced74078ee2)

#### [v6.145.0](https://github.com/opengovsg/FormSG/compare/v6.144.0...v6.145.0)

Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.146.0",
"version": "6.146.1",
"homepage": ".",
"private": true,
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const createResponsesV3 = (
returnedInputs[ff._id] = {
fieldType: ff.fieldType,
answer: {
hasBeenScanned: false, //TODO(MRF/FRM-1590): conditionally set to true if not replaced by respondent 2 onwards
hasBeenScanned: false, //TODO: FRM-1839 + FRM-1590 conditionally set to true if not replaced by respondent 2 onwards
answer: fieldIdToQuarantineKeyEntry.quarantineBucketKey,
},
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FormSG",
"description": "Form Manager for Government",
"version": "6.146.0",
"version": "6.146.1",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <formsg@data.gov.sg>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,9 @@ export const scanAndRetrieveAttachments = async (
.map((id) => {
const response = req.body.responses[id]
if (
response.fieldType !== BasicField.Attachment ||
response.answer.hasBeenScanned
response.fieldType !== BasicField.Attachment
// TODO: FRM-1839 + FRM-1590 Skip scanning if attachment has already been scanned
// || response.answer.hasBeenScanned
) {
return null
}
Expand Down Expand Up @@ -293,6 +294,7 @@ export const scanAndRetrieveAttachments = async (
// Step 3: Update responses with new values.
for (const idTaggedAttachmentResponse of scanAndRetrieveFilesResult.value) {
const { id, ...attachmentResponse } = idTaggedAttachmentResponse
// TODO: FRM-1839 Skip scanning if attachment has already been scanned
attachmentResponse.answer.hasBeenScanned = true
// Store the md5 hash in the DB as well for comparison later on.
attachmentResponse.answer.md5Hash = crypto
Expand Down
5 changes: 5 additions & 0 deletions src/app/modules/submission/receiver/receiver.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export const isBodyVersion2AndBelow = (
return (body.version ?? 0) < 3
}

/**
* MRF belongs to version 3
* @param body
* @returns
*/
export const isBodyVersion3AndAbove = (
body: ParsedMultipartForm<unknown>,
): body is ParsedMultipartForm<FieldResponsesV3> => {
Expand Down
5 changes: 3 additions & 2 deletions src/app/utils/response-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export const isFieldResponseV3Equal = (
const rMd5 = rAnswer.md5Hash

return (
(!lMd5 || !rMd5 || lMd5 === rMd5) &&
l.answer.hasBeenScanned === rAnswer.hasBeenScanned
!lMd5 || !rMd5 || lMd5 === rMd5
// TODO: FRM-1839 + FRM-1590 Skip scanning if attachment has already been scanned
// && l.answer.hasBeenScanned === rAnswer.hasBeenScanned
)
}
case BasicField.Section:
Expand Down

0 comments on commit c0b2172

Please sign in to comment.