From 85e87e8924187fec0949c01e56ffe364699b55f7 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:43:46 +0530 Subject: [PATCH] Update campaignUtils.ts --- utilities/project-factory/src/server/utils/campaignUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/project-factory/src/server/utils/campaignUtils.ts b/utilities/project-factory/src/server/utils/campaignUtils.ts index db107911d7d..0871a5bfc6d 100644 --- a/utilities/project-factory/src/server/utils/campaignUtils.ts +++ b/utilities/project-factory/src/server/utils/campaignUtils.ts @@ -582,7 +582,7 @@ async function enrichAndPersistCampaignForUpdate(request: any, firstPersist: boo enrichInnerCampaignDetails(request, updatedInnerCampaignDetails) request.body.CampaignDetails.campaignNumber = ExistingCampaignDetails?.campaignNumber request.body.CampaignDetails.campaignDetails = updatedInnerCampaignDetails - request.body.CampaignDetails.status = action == "create" ? campaignStatuses.started : campaignStatuses.drafted; + request.body.CampaignDetails.status = action == "changeDates" ? request.body.CampaignDetails.status : (action == "create" ? campaignStatuses.started : campaignStatuses.drafted); const boundaryCode = !(request?.body?.CampaignDetails?.projectId) ? getRootBoundaryCode(request.body.CampaignDetails.boundaries) : (request?.body?.CampaignDetails?.boundaryCode || ExistingCampaignDetails?.boundaryCode) request.body.CampaignDetails.boundaryCode = boundaryCode request.body.CampaignDetails.startDate = request?.body?.CampaignDetails?.startDate || ExistingCampaignDetails?.startDate || null