diff --git a/actions/azurestorage.js b/actions/azurestorage.js index ac3c5519..9bb8394b 100644 --- a/actions/azurestorage.js +++ b/actions/azurestorage.js @@ -84,6 +84,10 @@ const buildGetBlobListQueryPath = ({ containerName, casefolderID }) => { ); }; +const buildCaseObjectPath = (casefolderID) => { + return casefolderID + "/" + casefolderID + "_case.json"; +}; + const buildHashMetadataPaths = ({ containerName, casefolderID, blobname }) => { return { "hashedfilepath": hashAPIPath( @@ -275,7 +279,7 @@ export const getBlobs = async (containerName, casefolderID) => { "path": blob.name, "documentType": getDocumentTypeFromFilename(fileName), "versionId": blob.versionId, - "caseObj": casefolderID + "/" + casefolderID + "_case.json", + "caseObj": buildCaseObjectPath(casefolderID), "isCurrentVersion": blob.isCurrentVersion, "contentLength": blob.properties.contentLength, "size": blob.properties.contentLength, @@ -1297,7 +1301,7 @@ export const getProgressBlobs = async (containerName, caseReference) => { "name": appealBlobName, "path": blob.name, "versionId": blob.versionId, - "caseObj": caseReference + "/" + caseReference + "_case.json", + "caseObj": buildCaseObjectPath(caseReference), "isCurrentVersion": blob.isCurrentVersion, "contentLength": blob.properties.contentLength, "contentType": blob.contentType, diff --git a/memory-bank/change-log.md b/memory-bank/change-log.md index 1646a9be..fbd49187 100644 --- a/memory-bank/change-log.md +++ b/memory-bank/change-log.md @@ -3132,3 +3132,33 @@ Validation: Follow-ups: - Optional next bounded slice: targeted helper-consumer tidy in the same functions for any remaining repeated query-path literals outside touched object fields. + +--- + +### CL-088: TASK22269 Slice B1.13 — azurestorage touched-function caseObj helper reuse + +date: 2026-03-26 +author: Cline +scope: `actions/azurestorage.js` +type: change +rationale: Execute the next bounded readability slice by centralizing repeated case-object path composition in touched helper-consumer functions. +impact: Maintainability/readability improvement only; no route/query behavior changes. +status: completed + +Summary: + +- Added local helper `buildCaseObjectPath(casefolderID)`. +- Replaced repeated `caseObj` string assembly in touched functions: + - `getBlobs` + - `getProgressBlobs` +- Preserved existing `caseObj` output format (`/_case.json`). + +Validation: + +- `npm run lint` -> pass with warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors) +- `node tests/phase22/index.test.cjs` -> pass +- `node tests/phase7/service-behaviour.test.cjs` -> pass (13/13) + +Follow-ups: + +- Optional next bounded slice: continue tiny helper reuse in touched functions only if any duplicated path literals remain and can be reduced without behavior change.