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

Commit 3dd3b7f

Browse files
committed
fix: phase status
1 parent 2049b6c commit 3dd3b7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/ProcessorService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async function syncChallengePhases (legacyId, v5Phases, createdBy, isSelfService
8787
logger.debug(`Will update phase ${phaseName}/${v5Equivalent.name} from ${phase.duration} to duration ${v5Equivalent.duration * 1000} milli`)
8888

8989
let newStatus = v5Equivalent.isOpen ? constants.PhaseStatusTypes.Open : constants.PhaseStatusTypes.Scheduled;
90-
if (new Date().getTime() > new Date(v5Equivalent.scheduledEndDate).getTime()) {
90+
if (v5Equivalent.scheduledEndDate != null && v5Equivalent.scheduledEndDate.trim().length > 0 && new Date().getTime() > new Date(v5Equivalent.scheduledEndDate).getTime()) {
9191
newStatus = constants.PhaseStatusTypes.Closed;
9292
}
9393

0 commit comments

Comments
 (0)