Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 3664bad

Browse files
committed
Merge branch 'develop' of github.com:topcoder-platform/legacy-challenge-processor into develop
2 parents 07e9f14 + ceb4260 commit 3664bad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/services/ProcessorService.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,16 @@ async function syncChallengePhases (legacyId, v5Phases, createdBy, isSelfService
9595
// : (new Date().getTime() <= new Date(v5Equivalent.scheduledEndDate).getTime() ? constants.PhaseStatusTypes.Scheduled : constants.PhaseStatusTypes.Closed)
9696
// update phase
9797
logger.debug(`Will update phase ${phaseName}/${v5Equivalent.name} from ${phase.duration} to duration ${v5Equivalent.duration * 1000} milli`)
98+
const newStatus = v5Equivalent.isOpen
99+
? constants.PhaseStatusTypes.Open
100+
: (new Date().getTime() <= new Date(v5Equivalent.scheduledEndDate).getTime() ? constants.PhaseStatusTypes.Scheduled : constants.PhaseStatusTypes.Closed)
98101
await timelineService.updatePhase(
99102
phase.project_phase_id,
100103
legacyId,
101104
v5Equivalent.scheduledStartDate,
102105
v5Equivalent.scheduledEndDate,
103106
v5Equivalent.duration * 1000,
104-
phase.phase_status_id
107+
newStatus
105108
)
106109
// newStatus)
107110
// } else {

0 commit comments

Comments
 (0)