Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot exclude List Views with .forceignore after CustomObject retrieval #938

Closed
jcarmignani opened this issue Mar 23, 2021 · 10 comments
Closed
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@jcarmignani
Copy link

Summary

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:
image

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:
image

@jcarmignani jcarmignani added the investigating We're actively investigating this issue label Mar 23, 2021
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@mshanemc
Copy link
Contributor

@jcarmignani that's a very old version the cli. Can you verify it doesn't work with a newer version?

There's also an opt-in for using a newer version of the .forceignore

finally, try these changes:
**listViews => **/listViews
**.listView-meta.xml => **/listView-meta.xml

ignore syntax in v2 follows git: https://git-scm.com/docs/gitignore

@mshanemc mshanemc added the more information required Issue requires more information or a response from the customer label Mar 31, 2021
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@no-response
Copy link

no-response bot commented Apr 7, 2021

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.

@no-response no-response bot closed this as completed Apr 7, 2021
@jcarmignani
Copy link
Author

@mshanemc I have updated my version of the CLI using following command:
sfdx update

Then I have modified my .forceignore file as you suggest:
image

Eventually I have retrieved Metadata using the following manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <!--CustomObject--> <types> <members>Account</members> <members>Contact</members> <members>User</members> <members>*</members> <name>CustomObject</name> </types> <version>51.0</version> </Package>

I am still facing the same issue with the List Views:
image

Any suggestion?

@no-response no-response bot removed the more information required Issue requires more information or a response from the customer label Apr 8, 2021
@no-response no-response bot reopened this Apr 8, 2021
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Sep 28, 2021
@uip-robot-zz
Copy link

This issue has been linked to a new work item: W-9959024

@WillieRuemmele
Copy link
Member

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

@cristiand391
Copy link
Member

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

@jcarmignani
Copy link
Author

Thanks for providing a permanent fix to this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

5 participants