From f56b5c584aa0503cd308b3fe44058657aa935d88 Mon Sep 17 00:00:00 2001 From: Simran Gill Date: Fri, 10 Jan 2025 18:15:22 -0800 Subject: [PATCH] Refactored plannedAt implementation as per feedback --- .swp | Bin 0 -> 12288 bytes src/app/features/issue/issue.model.ts | 32 +++++++++--------- src/app/features/issue/issue.service.ts | 6 ---- .../open-project-common-interfaces.service.ts | 6 ++++ 4 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 .swp diff --git a/.swp b/.swp new file mode 100644 index 0000000000000000000000000000000000000000..570a327aed75ab14d7e802f82780d0d596e92b62 GIT binary patch literal 12288 zcmeI%y$*sf6o%o0o0CT4#sE5Fs4nbI3?>d>TroH}_!DIJPPr6ft1@;Yba|V!O=;8b zg#ZEwAb & { title: string } { @@ -144,6 +146,10 @@ export class OpenProjectCommonInterfacesService implements IssueServiceInterface issuePoints: issue.storyPoints, issueWasUpdated: false, // NOTE: we use Date.now() instead to because updated does not account for comments + plannedAt: issue.plannedAt + ? new Date(new Date(issue.plannedAt).setHours(7, 30, 0, 0)).getTime() + + this.oneDayInMilliseconds + : null, // Adjust plannedAt to 7 AM or set it to null if not present issueLastUpdated: new Date(issue.updatedAt).getTime(), ...(parsedEstimate > 0 ? { timeEstimate: parsedEstimate } : {}), };