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

Custom Object Translations in source format omit help text, labels, etc. that mdapi format includes #2830

Closed
eburtness opened this issue Apr 17, 2024 · 4 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@eburtness
Copy link

Summary

Custom Object Translations include help text, labels, picklist values, etc. as comments when retrieved via metadata API, but omit that info when retrieved in source format via sf project retrieve start. (Converting to source format via sf project convert mdapi also strips out that info.)

Is this behavior intentional or a bug? It's a problem because I want my source files to match what's retrieved by other tools using the metadata API such as Gearset.

Steps To Reproduce

  • Clone my example repo (this is a fork of dreamhouse-lwc with minimal modifications to demonstrate the issue)
  • Create scratch org and deploy project
  • Retrieve Contact object and translations via sf project retrieve start --manifest package.xml --target-metadata-dir temp-mdapi --unzip
  • Retrieve Contact object and translations via sf project retrieve start --manifest package.xml

Expected result

Content of Custom Object Translations matches, whether represented in mdapi format or source format.

Actual result

Unpackaged mdapi format file temp-mdapi/unpackaged/unpackaged/objectTranslations/Contact-en_US.objectTranslation includes help text, labels, picklist values, etc. as comments, like this:

        <help><!-- Please choose an option --></help>
        <label><!-- Example --></label>
        <name>Example__c</name>
        <picklistValues>
            <masterLabel>One</masterLabel>
            <translation><!-- One --></translation>
        </picklistValues>
        <picklistValues>
            <masterLabel>Two</masterLabel>
            <translation><!-- Two --></translation>
        </picklistValues>

(The above matches what is retrieved by other tools like Workbench, Gearset, etc.)

Decomposed source file force-app/main/default/objectTranslations/Contact-en_US/Example__c.fieldTranslation-meta.xml omits the labels, help text, etc., like this:

    <help></help>
    <label></label>
    <name>Example__c</name>
    <picklistValues>
        <masterLabel>One</masterLabel>
        <translation></translation>
    </picklistValues>
    <picklistValues>
        <masterLabel>Two</masterLabel>
        <translation></translation>
    </picklistValues>

System Information

Shell: zsh

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.37.4",
  "nodeVersion": "node-v20.11.1",
  "osVersion": "Darwin 23.4.0",
  "rootPath": "/Users/erickburtness/.local/share/sf/client/2.37.4-fb2a8ae",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.13 (core)",
    "@oclif/plugin-commands 3.2.2 (core)",
    "@oclif/plugin-help 6.0.20 (core)",
    "@oclif/plugin-not-found 3.1.2 (core)",
    "@oclif/plugin-plugins 5.0.7 (core)",
    "@oclif/plugin-search 1.0.20 (core)",
    "@oclif/plugin-update 4.2.4 (core)",
    "@oclif/plugin-version 2.0.16 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.15 (core)",
    "@oclif/plugin-which 3.1.7 (core)",
    "@salesforce/cli 2.37.4 (core)",
    "apex 3.1.4 (core)",
    "auth 3.5.5 (core)",
    "data 3.2.5 (core)",
    "deploy-retrieve 3.5.6 (core)",
    "env 3.0.26 (user)",
    "info 3.1.3 (core)",
    "limits 3.2.1 (core)",
    "marketplace 1.1.1 (core)",
    "org 4.0.4 (core)",
    "packaging 2.3.0 (core)",
    "schema 3.2.1 (core)",
    "settings 2.1.2 (core)",
    "sobject 1.2.2 (core)",
    "source 3.2.3 (core)",
    "telemetry 3.1.18 (core)",
    "templates 56.1.1 (core)",
    "trust 3.5.4 (core)",
    "user 3.4.3 (core)",
    "sfdx-git-delta 5.38.4 (user)"
  ]
}
@eburtness eburtness added the investigating We're actively investigating this issue label Apr 17, 2024
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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Apr 17, 2024
@mshanemc
Copy link
Contributor

yeah, I think it's stripping xml comments somewhere when converting xml => json => xml

@mshanemc mshanemc reopened this Apr 18, 2024
@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Apr 18, 2024
Copy link

git2gus bot commented Apr 18, 2024

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

@jshackell-sfdc
Copy link
Collaborator

This issue is fixed in version 2.40.7 (May 8, 2024) of the CLI. Enjoy!

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 validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants