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

Salesforce:Custom Label: value truncation after diff command #175

Closed
yurikernosenko opened this issue Aug 2, 2021 · 1 comment · Fixed by #177
Closed

Salesforce:Custom Label: value truncation after diff command #175

yurikernosenko opened this issue Aug 2, 2021 · 1 comment · Fixed by #177
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@yurikernosenko
Copy link

Hi All

I'm using sfdx sgd:source:delta to generate a diff.
And today I found one issue.

I have CustomLabels.labels-meta.xml.
In it I have the next label metadata(example):

<?xml version="1.0" encoding="UTF-8"?>
<CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata">
    <labels>
        <fullName>MY_TEST_VERSION2_0</fullName>
        <language>en_US</language>
        <protected>false</protected>
        <shortDescription>MY_TEST_VERSION2_0</shortDescription>
        <value>2.0</value>
    </labels>
</CustomLabels>

After running sfdx sgd:source:delta --to "HEAD" --from $(git rev-list --max-parents=0 HEAD) --output diff/ --generate-delta
In the diff folder, I see CustomLabels.labels-meta.xml.

But the content of that metadata is different(see below).

<?xml version="1.0" encoding="utf-8"?>
<CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata">
    <labels>
        <fullName>MY_TEST_VERSION2_0</fullName>
        <language>en_US</language>
        <protected>false</protected>
        <shortDescription>MY_TEST_VERSION2_0</shortDescription>
        <value>2</value>
    </labels>
</CustomLabels>

Value is truncated and instead of 2.0, it's now 2.
It's not reproducible if I have 2.0.1 or 2.1.

Currently, I have a workaround: clone label metadata from branch(stable) version to diff folder.

It will be really pitty if the same truncation applies also for Apex classes and other types of metadata.

@yurikernosenko yurikernosenko added the bug Something isn't working label Aug 2, 2021
@scolladon scolladon mentioned this issue Aug 2, 2021
7 tasks
@scolladon
Copy link
Owner

Hi @yurikernosenko !

Thanks for your interest in the plugin and for helping to make it better.

Nice catch, a PR is ongoing to fix this issue.

Stay tuned, next release should be in the next coming days

@mehdicherf mehdicherf added the good first issue Good for newcomers label Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants