Skip to content

Commit dd3b035

Browse files
Merge pull request #532 from topcoder-platform/master-plat-1187
Remove post mortem phase from First 2 Finish challenge
2 parents e8a9d42 + 8ee65fa commit dd3b035

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

config/default.js

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ module.exports = {
6969
OBSERVER_ROLE_ID: process.env.OBSERVER_ROLE_ID || '2a4dc376-a31c-4d00-b173-13934d89e286',
7070
CLIENT_MANAGER_ROLE_ID: process.env.OBSERVER_ROLE_ID || '9b2f1905-8128-42da-85df-ed64410f4781',
7171

72+
// topgear billing accounts
73+
TOPGEAR_BILLING_ACCOUNTS_ID: process.env.TOPGEAR_BILLING_ACCOUNTS_ID ? process.env.TOPGEAR_BILLING_ACCOUNTS_ID.split(',') : [],
74+
7275
// health check timeout in milliseconds
7376
HEALTH_CHECK_TIMEOUT: process.env.HEALTH_CHECK_TIMEOUT || 3000,
7477

src/services/ChallengeService.js

+11
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,17 @@ async function update (currentUser, challengeId, data, isFull) {
14501450
_.set(data, 'billing.billingAccountId', billingAccountId)
14511451
_.set(data, 'billing.markup', markup || 0)
14521452
}
1453+
if (billingAccountId && _.includes(config.TOPGEAR_BILLING_ACCOUNTS_ID, _.toString(billingAccountId))) {
1454+
if (_.isEmpty(data.metadata)) {
1455+
data.metadata = []
1456+
}
1457+
if (!_.find(data.metadata, e => e.name === 'postMortemRequired')) {
1458+
data.metadata.push({
1459+
name: 'postMortemRequired',
1460+
value: 'false'
1461+
})
1462+
}
1463+
}
14531464
if (data.status) {
14541465
if (data.status === constants.challengeStatuses.Active) {
14551466
if (!_.get(challenge, 'legacy.pureV5Task') && !_.get(challenge, 'legacy.pureV5') && _.isUndefined(_.get(challenge, 'legacyId'))) {

0 commit comments

Comments
 (0)