Cannot exclude List Views with .forceignore after CustomObject retrieval
See original GitHub issueSummary
Short summary of what is going on or to provide context.
I would like to exclude from metadata retrieve all the List Views that are fetched while using:
sfdx force:source:retrieve -m "CustomObject:Account"
Steps To Reproduce:
Insert the following lines in the .forceignore file:
# Exclude listViews **listViews **.listView-meta.xml **.listView
Then retrieve the Account object:
sfdx force:source:retrieve -m "CustomObject:Account"
Then check that the listViews folder is still there and the metadata for listViews as well:
Expected result
listViews folders should be empty or all listViews folder should be removed from the SFDX Project
Actual result
Describe what actually happened instead. listViews folders are still there and nothing is changed despite adding some listViews patterns as part of the .forceignore file
Additional information
Feel free to attach a screenshot.
SFDX CLI Version(to find the version of the CLI engine run sfdx --version): sfdx-cli/7.81.0-7b953c80d1 win32-x64 node-v12.18.3
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.1 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.3 (core)
analytics 1.12.1 (core)
auth 1.4.3 (1.4.3)
config 1.2.1 (core)
generator 1.1.3 (core)
odaseva-dx 0.0.0
salesforcedx 51.3.0 (latest-rc)
├─ salesforce-alm 51.3.0
├─ limits 1.0.4
├─ user 1.1.2
├─ schema 1.0.4
├─ custom-metadata 1.0.11
├─ apex 0.1.4
├─ templates 51.3.0
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7
sfdx-cli 7.81.0 (core)
OS and version:
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
This should be fixed in latest sfdx v7.130.1 🎉 Release notes: https://github.com/forcedotcom/cli/tree/main/releasenotes/sfdx#71301-dec-9-2021-stable
hi @jcarmignani I was able to add a listview to the
.forceignore
and see it be ignored. It is different than how they mention it though.by adding
force-app/main/default/objects/*/listViews/*.*.*
I was able to ignore all listviews from all objects
and by adding
force-app/main/default/objects/Broker__c/listViews/*.*.*
I was able to ignore just the custom object Broker__c’s list views