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

Commit 0959e0b

Browse files
committed
Test for phase syncing for multi-round challenges
1 parent 0fa9d9b commit 0959e0b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/constants.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ const PhaseStatusTypes = {
7171
Closed: 3
7272
}
7373

74+
const CheckpointPhaseTypes = {
75+
Submission: 'Checkpoint Submission',
76+
Screening: 'Checkpoint Screening',
77+
Review: 'Checkpoint Review',
78+
}
79+
7480
const prizeTypesIds = {
7581
Contest: 15,
7682
Checkpoint: 14
@@ -166,6 +172,7 @@ module.exports = {
166172
createChallengeStatusesMap,
167173
challengeStatuses,
168174
PhaseStatusTypes,
175+
CheckpointPhaseTypes,
169176
prizeTypesIds,
170177
supportedMetadata,
171178
scorecardQuestionMapping

src/services/ProcessorService.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,11 @@ async function processMessage (message) {
658658
if (_.get(message, 'payload.legacy.selfService')) {
659659
await disableTimelineNotifications(legacyId, createdByUserId) // disable
660660
}
661+
} else {
662+
const v5PhaseType = _.find(message.payload.phases, p => p.name === constants.CheckpointPhaseTypes.Submission)
663+
if (v5PhaseType) {
664+
await recreatePhases(legacyId, message.payload.phases, updatedByUserId)
665+
}
661666
}
662667

663668
logger.debug('Result from parsePayload:')

0 commit comments

Comments
 (0)