I have a custom object with a custom field that has the following XML definition:
<fields>
<fullName>ObjectType__c</fullName>
<externalId>false</externalId>
<inlineHelpText>Specifies the type of object from which the criterion selects objects to include in the group.</inlineHelpText>
<label>Object Type</label>
<required>true</required>
<trackTrending>false</trackTrending>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value>
<fullName>Contact</fullName>
<default>false</default>
<label>Contact</label>
</value>
<value>
<fullName>Site__c</fullName>
<default>false</default>
<label>Site</label>
</value>
<value>
<fullName>ProActiveContract__c</fullName>
<default>false</default>
<label>Contract</label>
</value>
<value>
<fullName>Job_Type__c</fullName>
<default>false</default>
<label>Job Type</label>
</value>
</valueSetDefinition>
</valueSet>
</fields>
First thing I noticed was the the label values were ignored when I originally deployed this to my dev org using IC (1.x at the time). I fixed the labels manually on my dev org and all was fine.
Now, however, I need to add two new entries in the picklist:
<fields>
<fullName>ObjectType__c</fullName>
<externalId>false</externalId>
<inlineHelpText>Specifies the type of object from which the criterion selects objects to include in the group.</inlineHelpText>
<label>Object Type</label>
<required>true</required>
<trackTrending>false</trackTrending>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value>
<fullName>Contact</fullName>
<default>false</default>
<label>Contact</label>
<description>Defines a base selection clause used directly and as the basis for inherited selections.</description>
</value>
<value>
<fullName>Site__c</fullName>
<default>false</default>
<label>Site</label>
<description>Defines a base selection clause used directly and as the basis for inherited selections.</description>
</value>
<value>
<fullName>ProActiveContract__c</fullName>
<default>false</default>
<label>Contract</label>
<description>Defines a base selection clause used directly and as the basis for inherited selections.</description>
</value>
<value>
<fullName>Job_Type__c</fullName>
<default>false</default>
<label>Job Type</label>
<description>Defines a base selection clause used directly and as the basis for inherited selections.</description>
</value>
<value>
<fullName>Booking_Requirement__c</fullName>
<default>false</default>
<label>Booking Requirement</label>
<description>The selection clause for this object type extends the inherited selections.</description>
</value>
<value>
<fullName>Shift__c</fullName>
<default>false</default>
<label>Shift</label>
<description>The selection clause for this object type extends the inherited selections.</description>
</value>
</valueSetDefinition>
</valueSet>
</fields>
When attempting to deploy I got the following error reported in the IDEA event log:
21:55 Deployment Failed
ERROR deploying CustomField objects/GroupCriterion__c.object: duplicate value found: <unknown> duplicates value on record with id: <unknown>
In the end I deleted/renamed the existing picklist values, deployed the updated custom object and then tidied up the cruft in the picklist. I noted that, again, the label didn't get correctly deployed (and the newly added description is ignored).
It seems to me that I shouldn't really see this issue and can only assume it was because I changed the labels on the dev org.
Anyone got any insights?
Phil