Sfdx-git-delta: Salesforce:Custom Label: value truncation after diff command

Created on 2 Aug 2021  路  1Comment  路  Source: scolladon/sfdx-git-delta

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.

bug good first issue

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RichardBeadle picture RichardBeadle  路  6Comments

lcee-info picture lcee-info  路  8Comments

DougMidgley picture DougMidgley  路  7Comments

robertoamd90 picture robertoamd90  路  4Comments

struthe picture struthe  路  3Comments