File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,17 @@ async function update (message) {
63
63
doc . endDate = getChallengeEndDate ( doc . phases , startDate )
64
64
logger . debug ( 'Updating End Date' , doc . endDate )
65
65
}
66
+ const registrationPhase = _ . find ( doc . phases , p => p . name === 'Registration' )
67
+ const submissionPhase = _ . find ( doc . phases , p => p . name === 'Submission' )
68
+ doc . currentPhaseNames = _ . map ( _ . filter ( doc . phases , p => p . isOpen === true ) , 'name' )
69
+ if ( registrationPhase ) {
70
+ doc . registrationStartDate = registrationPhase . actualStartDate || registrationPhase . scheduledStartDate
71
+ doc . registrationEndDate = registrationPhase . actualEndDate || registrationPhase . scheduledEndDate
72
+ }
73
+ if ( submissionPhase ) {
74
+ doc . submissionStartDate = submissionPhase . actualStartDate || submissionPhase . scheduledStartDate
75
+ doc . submissionEndDate = submissionPhase . actualEndDate || submissionPhase . scheduledEndDate
76
+ }
66
77
}
67
78
logger . debug ( 'Updating ES' , doc )
68
79
await client . update ( {
You can’t perform that action at this time.
0 commit comments