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

Commit 925fced

Browse files
committed
update new phase status
1 parent 2a0e5ee commit 925fced

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/services/ProcessorService.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ async function syncChallengePhases (legacyId, v5Phases, createdBy, isSelfService
127127
if (v5Equivalents.length === phaseGroups[key].length) {
128128
const v5Equivalent = v5Equivalents[phaseOrder]
129129
logger.debug(`Will update phase ${phaseName}/${v5Equivalent.name} from ${phase.duration} to duration ${v5Equivalent.duration * 1000} milli`)
130+
let newStatus = _.toInteger(phase.phase_status_id)
131+
if (v5Equivalent.isOpen && _.toInteger(phase.phase_status_id) === constants.PhaseStatusTypes.Closed) {
132+
newStatus = constants.PhaseStatusTypes.Scheduled
133+
}
130134
const newStatus = v5Equivalent.isOpen
131135
? constants.PhaseStatusTypes.Open
132136
: _.toInteger(phase.phase_status_id)

0 commit comments

Comments
 (0)