Skip to content

Commit 47a8549

Browse files
author
vikasrohit
authored
Merge pull request #639 from topcoder-platform/develop
[PROD] Prod Release Draft
2 parents d2124c8 + 388267c commit 47a8549

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

config/default.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@
8282
"CLIENT_AUDIENCE": "",
8383
"SUBJECT": "",
8484
"CLIENT_ID": ""
85-
}
85+
},
86+
"sfdcBillingAccountNameField": "Billing_Account_Name__c"
8687
}

config/development.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"connectProjectsUrl": "https://connect.topcoder-dev.com/projects/",
88
"memberServiceEndpoint": "https://api.topcoder-dev.com/v3/members",
99
"identityServiceEndpoint": "https://api.topcoder-dev.com/v3/",
10-
"taasJobApiUrl": "https://api.topcoder-dev.com/v5/jobs"
10+
"taasJobApiUrl": "https://api.topcoder-dev.com/v5/jobs",
11+
"sfdcBillingAccountNameField": "Billing_Account_Name__c"
1112
}

config/production.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"authDomain": "topcoder.com",
3-
"connectProjectsUrl": "https://connect.topcoder.com/projects/"
3+
"connectProjectsUrl": "https://connect.topcoder.com/projects/",
4+
"sfdcBillingAccountNameField": "Billing_Account_name__c"
45
}

src/routes/projects/create.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const createProjectValidations = {
2929
body: Joi.object().keys({
3030
name: Joi.string().required(),
3131
description: Joi.string().allow(null).allow('').optional(),
32-
billingAccountId: Joi.number().positive(),
32+
billingAccountId: Joi.number().positive().allow(null),
3333
utm: Joi.object().keys({
3434
source: Joi.string().allow(null),
3535
medium: Joi.string().allow(null),

src/routes/projects/update.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const updateProjectValdiations = {
4141
id: Joi.number().valid(Joi.ref('$params.id')),
4242
name: Joi.string(),
4343
description: Joi.string().allow(null).allow('').optional(),
44-
billingAccountId: Joi.number().positive(),
44+
billingAccountId: Joi.number().positive().allow(null),
4545
directProjectId: Joi.number().positive().allow(null),
4646
status: Joi.any().valid(_.values(PROJECT_STATUS)),
4747
estimatedPrice: Joi.number().precision(2).positive().allow(null),

src/services/salesforceService.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class SalesforceService {
7070
10,
7171
null, // fallback to null if cannot parse
7272
),
73-
name: _.get(o, 'Topcoder_Billing_Account__r.Billing_Account_name__c'),
73+
name: _.get(o, `Topcoder_Billing_Account__r.${config.get('sfdcBillingAccountNameField')}`),
7474
startDate: _.get(o, 'Topcoder_Billing_Account__r.Start_Date__c'),
7575
endDate: _.get(o, 'Topcoder_Billing_Account__r.End_Date__c'),
7676
}));

0 commit comments

Comments
 (0)