Skip to content

Filter Package.xml: CustomObjects with __mdt and __feed not filtering correctly #40

@fitzman49

Description

@fitzman49

Describe the bug
Specific object definitions ending in __mdt and __feed are not getting filtered correctly when running the package.xml filter command. They do not contain all the metadata from the original file which results in deployment failures using SFDX MDAPI commands. According to the documentation these types of files are supported by Salesforce and should be deployable: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_custom_objects_list.htm.

To Reproduce
Steps to reproduce the behavior:

  1. Define a CustomObject metadata type in package.xml that ends with __mdt or __feed. Ensure this CustomObject has custom fields created against it.
    <members>MyCustomObject__mdt</members> <type>CustomObject</type>
  2. Run the essentials:metadata:filter-from-packagexml command against that package.xml
  3. Observe that the custom fields are not present in the resulting file. It only contains a shell of what the object should look like.
  4. Deploying this out using SFDX MDAPI commands will result in a failure if other metadata defined in package.xml depend on these custom fields.

Expected behavior
Filtered sub-metadata (fields, listviews, etc) should be filtered correctly and included in the produced file similar to standard objects and custom objects ending in __c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions