@@ -67,6 +67,8 @@ async function getPhaseTypes () {
67
67
}
68
68
69
69
async function insertPhaseDependency ( dependencyPhaseId , dependentPhaseId , dependencyStart , createdBy ) {
70
+
71
+ logger . info ( `Creating phase dependency ${ dependencyPhaseId } to ${ dependentPhaseId } at ${ dependencyStart } ` )
70
72
const connection = await helper . getInformixConnection ( )
71
73
let result = null
72
74
try {
@@ -185,18 +187,6 @@ async function createPhase (challengeLegacyId, phaseTypeId, statusTypeId, schedu
185
187
] )
186
188
await connection . commitTransactionAsync ( )
187
189
188
- //Handle checkpoint phases
189
- //Magic numbers: 15=checkpoint submission, 16=checkpoint screen, 17=checkpoint review, 1=registration
190
- //For dependencyStart: 1=start, 0=end
191
- if ( phaseTypeId == 17 ) {
192
- registrationPhaseId = await this . getProjectPhaseId ( challengeLegacyId , 1 )
193
- checkpointSubmissionPhaseId = await this . getProjectPhaseId ( challengeLegacyId , 15 )
194
- checkpointScreeningPhaseId = await this . getProjectPhaseId ( challengeLegacyId , 16 )
195
- checkpointReviewPhaseId = await this . getProjectPhaseId ( challengeLegacyId , 17 )
196
- await this . insertPhaseDependency ( registrationPhaseId , checkpointSubmissionPhaseId , 1 , createdBy )
197
- await this . insertPhaseDependency ( checkpointSubmissionPhaseId , checkpointScreeningPhaseId , 0 , createdBy )
198
- await this . insertPhaseDependency ( checkpointScreeningPhaseId , checkpointReviewPhaseId , 0 , createdBy )
199
- }
200
190
} catch ( e ) {
201
191
logger . error ( `Error in 'createPhase' ${ e } , rolling back transaction` )
202
192
await connection . rollbackTransactionAsync ( )
@@ -291,5 +281,7 @@ module.exports = {
291
281
updatePhase,
292
282
enableTimelineNotifications,
293
283
createPhase,
294
- dropPhase
284
+ dropPhase,
285
+ insertPhaseDependency,
286
+ getProjectPhaseId
295
287
}
0 commit comments