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

Commit 44c176e

Browse files
authored
Merge pull request #110 from topcoder-platform/multi-round-sync
Try something different
2 parents b2242ff + 58c6a36 commit 44c176e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/services/timelineService.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const QUERY_CREATE_TIMELINE_NOTIFICATIONS = 'INSERT INTO project_info (project_i
2828
const QUERY_UPDATE_TIMELINE_NOTIFICATIONS = 'UPDATE project_info SET value = "On", modify_user = ?, modify_date = CURRENT WHERE project_info_type_id = "11" AND project_id = ?'
2929

3030
const QUERY_INSERT_CHALLENGE_PHASE_DEPENDENCY = 'INSERT INTO phase_dependency (dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) VALUES (?, ?, ?, 1, 0, ?, CURRENT, ?, CURRENT)'
31-
const QUERY_GET_PROJECT_PHASE_ID = 'SELECT project_phase_id FROM project_phase WHERE project_id = ? AND phase_type_id = ?'
31+
const QUERY_GET_PROJECT_PHASE_ID = 'SELECT project_phase_id FROM project_phase WHERE project_id = %d AND phase_type_id = %d'
3232
/**
3333
* Formats a date into a format supported by ifx
3434
* @param {String} dateStr the date in string format
@@ -93,8 +93,7 @@ async function getProjectPhaseId(challengeLegacyId, phaseTypeId) {
9393
let result = null
9494
try {
9595
await connection.beginTransactionAsync()
96-
let query = await prepare(connection, QUERY_GET_PROJECT_PHASE_ID)
97-
result = await query.executeAsync([challengeLegacyId, phaseTypeId])
96+
result = await connection.queryAsync(util.format(QUERY_GET_PROJECT_PHASE_ID, challengeLegacyId, phaseTypeId))
9897
} catch (e) {
9998
logger.error(`Error in 'getProjectPhaseId' ${e}`)
10099
throw e

0 commit comments

Comments
 (0)