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

Commit ecf9657

Browse files
Merge pull request #89 from topcoder-platform/develop
[Next Release] PROD 2252 and PLAT 1128
2 parents a633109 + 393e396 commit ecf9657

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/services/ProcessorService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ async function getLegacyTrackInformation (trackId, typeId, tags, m2mToken) {
342342
`typeId=${typeId}`
343343
]
344344
_.each((tags || []), (tag) => {
345-
query.push(`tags[]=${tag}`)
345+
query.push(`tags[]=${encodeURIComponent(tag)}`)
346346
})
347347
try {
348348
const res = await helper.getRequest(`${config.V5_CHALLENGE_MIGRATION_API_URL}/convert-to-v4?${query.join('&')}`, m2mToken)

src/services/selfServiceReviewerService.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const util = require('util')
66
const logger = require('../common/logger')
77
const helper = require('../common/helper')
88

9-
const QUERY_GET_ENTRY = 'SELECT parameter FROM phase_criteria WHERE project_phase_id = %d'
9+
const QUERY_GET_ENTRY = 'SELECT parameter FROM phase_criteria WHERE project_phase_id = %d AND phase_criteria_type_id = 6'
1010
const QUERY_CREATE = 'INSERT INTO phase_criteria (project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) VALUES (?, 6, ?, ?, CURRENT, ?, CURRENT)'
11-
const QUERY_UPDATE = 'UPDATE phase_criteria SET parameter = ?, modify_user = ?, modify_date = CURRENT WHERE project_phase_id = ?'
12-
const QUERY_DELETE = 'DELETE FROM phase_criteria WHERE project_phase_id = ?'
11+
const QUERY_UPDATE = 'UPDATE phase_criteria SET parameter = ?, modify_user = ?, modify_date = CURRENT WHERE project_phase_id = ? AND phase_criteria_type_id = 6'
12+
const QUERY_DELETE = 'DELETE FROM phase_criteria WHERE project_phase_id = ? AND phase_criteria_type_id = 6'
1313

1414
/**
1515
* Prepare Informix statement
@@ -43,10 +43,9 @@ async function getEntry (phaseId) {
4343
}
4444

4545
/**
46-
* Enable timeline notifications
46+
* Merge number of reviewers
4747
* @param {Number} phaseId the legacy challenge ID
48-
* @param {Number} typeId the type ID
49-
* @param {Any} value the value
48+
* @param {Number=} value the value
5049
* @param {String} createdBy the created by
5150
*/
5251
async function createOrSetNumberOfReviewers (phaseId, value, createdBy) {
@@ -67,7 +66,7 @@ async function createOrSetNumberOfReviewers (phaseId, value, createdBy) {
6766
}
6867
} else {
6968
const query = await prepare(connection, QUERY_CREATE)
70-
logger.info(`Will delete with values: ${phaseId}, ${value}, ${createdBy}, ${createdBy}`)
69+
logger.info(`Will create with values: ${phaseId}, ${value}, ${createdBy}, ${createdBy}`)
7170
result = await query.executeAsync([phaseId, value, createdBy, createdBy])
7271
}
7372
await connection.commitTransactionAsync()

0 commit comments

Comments
 (0)