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

Additional formality and logging #107

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/services/ProcessorService.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ async function recreatePhases (legacyId, v5Phases, createdBy) {
if(phaseLegacyId==17){
logger.info(`Creating phase dependencies for checkpoint phases`)

registrationPhaseId = await timelineService.getProjectPhaseId(legacyId, 1)
checkpointSubmissionPhaseId = await timelineService.getProjectPhaseId(legacyId, 15)
checkpointScreeningPhaseId = await timelineService.getProjectPhaseId(legacyId, 16)
checkpointReviewPhaseId = await timelineService.getProjectPhaseId(legacyId, 17)
const registrationPhaseId = await timelineService.getProjectPhaseId(legacyId, 1)
const checkpointSubmissionPhaseId = await timelineService.getProjectPhaseId(legacyId, 15)
const checkpointScreeningPhaseId = await timelineService.getProjectPhaseId(legacyId, 16)
const checkpointReviewPhaseId = await timelineService.getProjectPhaseId(legacyId, 17)

await timelineService.insertPhaseDependency(registrationPhaseId, checkpointSubmissionPhaseId, 1, createdBy)
await timelineService.insertPhaseDependency(checkpointSubmissionPhaseId, checkpointScreeningPhaseId, 0, createdBy)
Expand Down
4 changes: 3 additions & 1 deletion src/services/timelineService.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ async function getProjectPhaseId(challengeLegacyId, phaseTypeId) {
} finally {
await connection.closeAsync()
}
return _.get(result, '[0].project_phase_id', null)
const project_phase_id = _.get(result, '[0].project_phase_id', null)
logger.info(`Project phase ID: ${project_phase_id}`)
return project_phase_id
}
/**
* Drop challenge phase
Expand Down