Skip to content

excluded-metadata flag on sf project generate manifest doesn't exclude all types #3232

@NBray-VTG

Description

@NBray-VTG

Summary

When running sf project generate manifest --from-org my-org --name package --excluded-metadata ReportType --excluded-metadata Dashboard --excluded-metadata Report I noticed it was only taking out the ReportType and not Reports and Dashboards from the generated package xml.

I reduced this to only attempt to exclude 1 option, and it would not exclude either of the two that failed before.
I went on and attempted CustomObject (which worked) and EmailTemplate (which did not work).
I suspect it might have something to do with types of metadata that can use the '*' wildcard in the manifest vs those that can't... if that helps any

Steps To Reproduce

I believe a full project would not be required, but rather an authorized org containing metadata mentioned above. (If you need me to make a repo for this I can, but since this only generates a manifest, I figured any org available to you would be sufficient)

  1. Run sf project generate manifest --from-org {alias} --name package --excluded-metadata ReportType --excluded-metadata Dashboard --excluded-metadata Report --excluded-metadata CustomObject --excluded-metadata EmailTemplate

Expected result

No metadata listed for the 5 Metadata types specified

Actual result

Reports, Dashboards, and EmailTemplates remain listed in the package.xml

System Information

{
    "architecture": "darwin-arm64",
    "cliVersion": "@salesforce/cli/2.78.3",
    "nodeVersion": "node-v23.5.0",
    "osVersion": "Darwin 24.3.0",
    "rootPath": "~/.nvm/versions/node/v23.5.0/lib/node_modules/@salesforce/cli",
    "shell": "zsh",
    "pluginVersions": [
      "@oclif/plugin-autocomplete 3.2.21 (core)",
      "@oclif/plugin-commands 4.1.20 (core)",
      "@oclif/plugin-help 6.2.25 (core)",
      "@oclif/plugin-not-found 3.2.40 (core)",
      "@oclif/plugin-plugins 5.4.32 (core)",
      "@oclif/plugin-search 1.2.21 (core)",
      "@oclif/plugin-update 4.6.31 (core)",
      "@oclif/plugin-version 2.2.23 (core)",
      "@oclif/plugin-warn-if-update-available 3.1.33 (core)",
      "@oclif/plugin-which 3.2.29 (core)",
      "@salesforce/cli 2.78.3 (core)",
      "apex 3.6.8 (core)",
      "api 1.3.3 (core)",
      "auth 3.6.94 (core)",
      "custom-metadata 3.3.40 (user)",
      "data 4.0.11 (core)",
      "deploy-retrieve 3.20.0 (core)",
      "info 3.4.39 (core)",
      "limits 3.3.46 (core)",
      "marketplace 1.3.7 (core)",
      "org 5.2.32 (core)",
      "packaging 2.9.17 (core)",
      "schema 3.3.50 (core)",
      "settings 2.4.16 (core)",
      "sobject 1.4.50 (core)",
      "telemetry 3.6.33 (core)",
      "templates 56.3.38 (core)",
      "trust 3.7.65 (core)",
      "user 3.6.9 (core)"
    ]
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue or pull request that identifies or fixes a bugvalidatedVersion information for this issue has been validated

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions