Skip to content

Commit 42e9103

Browse files
Remove post mortem phase from topgear challenge
1 parent cc1ae62 commit 42e9103

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

app-constants.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ const prizeSetTypes = {
1818
CheckpointPrizes: 'checkpoint'
1919
}
2020

21+
const topGearBillingAccounts = [
22+
'80000062',
23+
'80002800'
24+
]
25+
2126
const challengeStatuses = {
2227
New: 'New',
2328
Draft: 'Draft',
@@ -140,5 +145,6 @@ module.exports = {
140145
DiscussionTypes,
141146
reviewTypes,
142147
SelfServiceNotificationTypes,
143-
SelfServiceNotificationSettings
148+
SelfServiceNotificationSettings,
149+
topGearBillingAccounts
144150
}

src/services/ChallengeService.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,17 @@ async function update (currentUser, challengeId, data, isFull) {
14911491
_.set(data, 'billing.billingAccountId', billingAccountId)
14921492
_.set(data, 'billing.markup', markup || 0)
14931493
}
1494+
if (billingAccountId && _.includes(constants.topGearBillingAccounts, _.toString(billingAccountId))) {
1495+
if (_.isEmpty(data.metadata)) {
1496+
data.metadata = []
1497+
}
1498+
if (!_.find(data.metadata, e => e.name === 'postMortemRequired')) {
1499+
data.metadata.push({
1500+
name: 'postMortemRequired',
1501+
value: 'false'
1502+
})
1503+
}
1504+
}
14941505
if (data.status) {
14951506
if (data.status === constants.challengeStatuses.Active) {
14961507
if (!_.get(challenge, 'legacy.pureV5Task') && !_.get(challenge, 'legacy.pureV5') && _.isUndefined(_.get(challenge, 'legacyId'))) {

0 commit comments

Comments
 (0)