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

force:source:retrieve Reports contained within a 2+ folder hierarchy cannot be retrieved #1173

Closed
clopezramos-everis opened this issue Sep 6, 2021 · 7 comments
Labels
investigating We're actively investigating this issue

Comments

@clopezramos-everis
Copy link

clopezramos-everis commented Sep 6, 2021

Summary

If a Report is contained in a 2+ folder hierarchy the result of the command force:source:retrieve is:

image

Steps To Reproduce:

  1. Create a package.xml that contains the target report
  2. Run the command targeting the package.xml.
    Example: sfdx force:source:retrieve --manifest ./manifest/my-package.xml --apiversion 52.0

Expected result

Get the report within its folder structure

Actual result

Get nothing

System Information

{
        "cliVersion": "sfdx-cli/7.116.2",
        "architecture": "win32-x64",
        "nodeVersion": "node-v14.17.5",
        "pluginVersions": [
                "@oclif/plugin-autocomplete 0.3.0 (core)",
                "@oclif/plugin-commands 1.3.0 (core)",
                "@oclif/plugin-help 3.2.2 (core)",
                "@oclif/plugin-not-found 1.2.4 (core)",
                "@oclif/plugin-plugins 1.10.1 (core)",
                "@oclif/plugin-update 1.4.0-3 (core)",
                "@oclif/plugin-warn-if-update-available 1.7.0 (core)",
                "@oclif/plugin-which 1.0.3 (core)",
                "@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
                "@salesforce/sfdx-trust 3.6.0 (core)",
                "alias 1.1.10 (core)",
                "apex 0.2.8 (core)",
                "auth 1.7.1 (core)",
                "config 1.2.24 (core)",
                "custom-metadata 1.0.12 (core)",
                "data 0.6.1 (core)",
                "generator 1.1.7 (core)",
                "limits 1.2.1 (core)",
                "org 1.7.0 (core)",
                "salesforce-alm 52.3.1 (core)",
                "schema 1.0.8 (core)",
                "sfdmu 4.4.5",
                "sfdx-cli 7.116.2 (core)",
                "sfdx-git-delta 4.8.1",
                "sfdx-profiles-splitter 0.1.0",
                "source 1.0.12 (core)",
                "telemetry 1.2.3 (core)",
                "templates 52.1.0 (core)",
                "user 1.4.0 (core)"
        ],
        "osVersion": "Windows_NT 10.0.18363"
}

Additional information

If the same package.xml is used with force:mdapi:retrive, the output actually contains the target report
Example: sfdx force:mdapi:retrieve --apiversion 52.0 -k ./manifest/custom-package.xml --loglevel debug -r test

@clopezramos-everis clopezramos-everis added the investigating We're actively investigating this issue label Sep 6, 2021
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

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

do you have a repo that has nested report folders in it? you left the link to dreamhouse but it has no reports.

https://github.com/trailheadapps/dreamhouse-lwc/tree/main/force-app/main/default does

@mshanemc mshanemc added the more information required Issue requires more information or a response from the customer label Sep 10, 2021
@clopezramos-everis
Copy link
Author

the repo is private, my mistake for not erasing the default link in the issue template.

and yes I have many reports contained in several folders in my orgs.

@no-response no-response bot removed the more information required Issue requires more information or a response from the customer label Sep 13, 2021
@anderg4
Copy link

anderg4 commented Sep 17, 2021

sfdx --version
sfdx-cli/7.118.1 win32-x64 node-v14.17.6

To reproduce for dashboards:

  1. Create dashboard folder AAA.
  2. Within AAA create dashboard folder BBB.

package.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
	<types>
		<members>AAA</members>
		<members>AAA/BBB</members>
		<name>Dashboard</name>
	</types>
	<version>51.0</version>
</Package>

In VSCode, Retrieve source from package

Expected result:

.../dashboards/
    AAA.dashboardFolder-meta.xml
    AAA/
        BBB.dashboardFolder-meta.xml
        BBB/

Actual result:

=== Retrieve Warnings
FULL NAME  TYPE       MESSAGE                                                   
─────────  ─────────  ──────────────────────────────────────────────────────────
AAA/BBB    Dashboard  Entity of type 'Dashboard' named 'AAA/BBB' cannot be found

@anderg4
Copy link

anderg4 commented Sep 17, 2021

Then, even better - try something a little different...

sfdx --version
sfdx-cli/7.118.1 win32-x64 node-v14.17.6

To reproduce for dashboards:

  1. Create dashboard folder AAA.
  2. Within AAA create dashboard folder BBB.

package.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
	<types>
		<members>AAA</members>
		<members>BBB</members>
		<name>Dashboard</name>
	</types>
	<version>51.0</version>
</Package>

In VSCode, Retrieve source from package

Expected result:

=== Retrieve Warnings
FULL NAME  TYPE       MESSAGE                                                   
─────────  ─────────  ──────────────────────────────────────────────────────────
BBB    Dashboard  Entity of type 'Dashboard' named 'BBB' cannot be found

Actual result:

.../dashboards/
    AAA.dashboardFolder-meta.xml
.../emailservices/
    BBB-meta.xml-meta.xml

@shetzel
Copy link
Contributor

shetzel commented Sep 20, 2021

This is currently being fixed and should be in the next CLI release candidate. It's tracked internally with W-9739746. It applies to all metadata types classified as "in folder". Reports, dashboards, email templates, and documents.

@cristiand391
Copy link
Member

This was fixed in latest v7.120.0, release notes:
https://github.com/forcedotcom/cli/tree/main/releasenotes#71200-sept-30-2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

5 participants