Deprecate Probability field on Opportunity (#6207)
Closes #5735. The field probability on opportunity will - - stop being created for new workspaces (after this PR is merged) - have "isCustom" value set to true and be displayed as such in the settings (after this PR is merged + sync-metadata is run on workspace) - still show in the views (all the time) This field is deprecated as a standard field but not replaced by another one, so we are not adding the `(deprecated)` suffix in the label.
This commit is contained in:
@ -3,12 +3,6 @@ import { v4 } from 'uuid';
|
||||
|
||||
const tableName = 'opportunity';
|
||||
|
||||
const getRandomProbability = () => {
|
||||
const firstDigit = Math.floor(Math.random() * 9) + 1;
|
||||
|
||||
return firstDigit / 10;
|
||||
};
|
||||
|
||||
const getRandomStage = () => {
|
||||
const stages = ['NEW', 'SCREENING', 'MEETING', 'PROPOSAL', 'CUSTOMER'];
|
||||
|
||||
@ -28,7 +22,6 @@ const generateOpportunities = (companies) => {
|
||||
amountCurrencyCode: 'USD',
|
||||
closeDate: new Date(),
|
||||
stage: getRandomStage(),
|
||||
probability: getRandomProbability(),
|
||||
pointOfContactId: company.personId,
|
||||
companyId: company.id,
|
||||
}));
|
||||
@ -56,7 +49,6 @@ export const opportunityPrefillDemoData = async (
|
||||
'amountCurrencyCode',
|
||||
'closeDate',
|
||||
'stage',
|
||||
'probability',
|
||||
'pointOfContactId',
|
||||
'companyId',
|
||||
'position',
|
||||
|
||||
@ -47,16 +47,6 @@ export const viewOpportunityFields = (
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
fieldMetadataId:
|
||||
objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
|
||||
OPPORTUNITY_STANDARD_FIELD_IDS.probability
|
||||
],
|
||||
viewId: viewId,
|
||||
position: 4,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
fieldMetadataId:
|
||||
objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
|
||||
|
||||
@ -251,7 +251,7 @@ export const OPPORTUNITY_STANDARD_FIELD_IDS = {
|
||||
name: '20202020-8609-4f65-a2d9-44009eb422b5',
|
||||
amount: '20202020-583e-4642-8533-db761d5fa82f',
|
||||
closeDate: '20202020-527e-44d6-b1ac-c4158d307b97',
|
||||
probability: '20202020-69d4-45f3-9703-690b09fafcf0',
|
||||
probabilityDeprecated: '20202020-69d4-45f3-9703-690b09fafcf0',
|
||||
stage: '20202020-6f76-477d-8551-28cd65b2b4b9',
|
||||
position: '20202020-806d-493a-bbc6-6313e62958e2',
|
||||
pointOfContact: '20202020-8dfb-42fc-92b6-01afb759ed16',
|
||||
|
||||
Reference in New Issue
Block a user