CumulusCI
CumulusCI copied to clipboard
Task add_picklist_entries always sets a default value for record types
Describe the bug
When the task add_picklist_entries is used with the "--record_types" parameter, always the last value provided in "entries" is set as a default value for each given record type. This happens even if for all entries the option "default: False" has been set.
This behavior prevents usage of the ETL task for picklist fields without default values on objects with record types. Or is there some workaround with a modified task configuration?
Reproduction steps
- Create a task with this definition
add_picklist_values_reason_for_inactivity:
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
description:
This is done as CumulusCI post-deploy step, because of a known issue with deployment of
picklist fields during unlocked package upgrade
(https://trailblazer.salesforce.com/issues_view?id=a1p3A0000003Uk2QAE)
options:
picklists:
- Account.Reason_For_Inactivity__c
entries:
- fullName: Deletion by Request
default: False
- fullName: Deletion after Retention Period
default: False
- fullName: Blacklist
default: False
- fullName: Deceased
default: False
- fullName: Inactive
default: False
record_types:
- HH_Account
- Organization
- Run it with "cci task run add_picklist_values_reason_for_inactivity"
- Open the Account object in Object Manager and open each of the record types HH_Account and Organization. Click on "Edit" next to the picklist field Reason_For_Inactivity__c and check the "Default" dropdown: it is set to "Inactive" but should be "<None>"
Your CumulusCI and Python versions
CumulusCI version: 3.72.0 Python version: 3.10.6
Operating System
Windows
Windows environment
Bash on Windows
CumulusCI installation method
pip
Error Gist
No response
Additional information
Post in the CumulusCI Trailblazer Community group: https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000NEcU1SAL