CumulusCI
CumulusCI copied to clipboard
cci task run update_package_xml and Salesforce Case Custom Object
Describe the bug
For my Salesforce deployments, I use the "cci task run update_package_xml --path src" command to generate the src/package.xml from my folder stucture
This works great for all objects, except the Case Object.
I have the following file:
src/objects/Case.object
I then run: cci task run update_package_xml --path src
I am expecting a src/package.xml to be generated that looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Case</members>
<name>CustomObject</name>
</types>
<version>45.0</version>
</Package>
However, I do not. I get a src/package.xml that has the Case Object broken down into its individual components. For some reason it does not genereate all the objects from my Case.object, so I cannot use that.
Is there a way to run the "cci task run update_package_xml" command so it generates the src/package.xml as shown above?
Thank you.
Reproduction steps
See above
Your CumulusCI and Python versions
My Dockerfile has the latest:
FROM salesforce/salesforcedx:7.142.1-full
RUN apt update RUN apt install python3-pip -y RUN python3 -m pip install --upgrade pip RUN python3 -m pip install contextvars RUN python3 -m pip install cumulusci
Operating System
Linux
Windows environment
No response
CumulusCI installation method
No response
Error Gist
No response
Additional information
No response
Thank you for filing this issue. Could you please provide an example of Case metadata that produces an incorrect result?
You can use this:
<?xml version="1.0" encoding="utf-8"?><CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<businessProcesses>
<fullName>Intake Analytics</fullName>
<isActive>true</isActive>
<values>
<fullName>DD Queue</fullName>
<default>false</default>
</values>
<values>
<fullName>Deal Desk In Process</fullName>
<default>false</default>
</values>
<values>
<fullName>Drafting</fullName>
<default>false</default>
</values>
<values>
<fullName>None</fullName>
<default>true</default>
</values>
<values>
<fullName>Out for Review</fullName>
<default>false</default>
</values>
<values>
<fullName>Request Closed</fullName>
<default>false</default>
</values>
</businessProcesses>
</CustomObject>
I see the latest version of CumulusCI generating the package.xml for this metadata:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>issue-3137</fullName>
<types>
<members>Case.Intake Analytics</members>
<name>BusinessProcess</name>
</types>
<version>52.0</version>
</Package>
This appears to me to be correct. Can you help me understand where you are observing missing components?
I am not allowed to share my entire Case.object, but it was missing things like actionOverrides
<actionOverrides>
<actionName>NewCase</actionName>
<content>JJ_CreateNewHeaderCase</content>
<formFactor>Large</formFactor>
<skipRecordTypeSelect>true</skipRecordTypeSelect>
<type>LightningComponent</type>
</actionOverrides>
Why does it build/expand the src/package.xml out like that? Can't the command just make it like this and use the file on the file system?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Case</members>
<name>CustomObject</name>
</types>
<version>45.0</version>
</Package>
Thank you for the clarification.
CumulusCI originated in the managed package world, and the behavior we're seeing here is a holdover from how that support was originally designed (standard objects aren't packageable, so CumulusCI deliberately omits them from the package.xml). The facets that you are pointing to, unlike Business Processes, aren't individually-addressable components, so they are also not included.
I will write a bug for us to investigate how we can best manage this behavior.
Tracking this bug as W-10909286
Any updates on this?
@jhgihub0 We've triaged this bug and placed it on our backlog. Unfortunately I cannot commit to a specific delivery date for a fix; it is not a quick change.
In the meantime, I'm afraid that the only workarounds I can offer are
- Stop using
update_package_xmland maintain the manifest by hand. - Use SFDX format for your source, without a manifest, instead of Metadata API format
- Manually update the manifest after running
update_package_xml
I'm sorry for the frustration.
Any updates?
We have no updates at this time. We will update this Issue when we are able to ship changes to this behavior.