forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
488 stars 78 forks source link

Loss of data in picklist values when deploying picklists with values with leading zeros #954

Closed JNiedle closed 2 years ago

JNiedle commented 3 years ago

Summary

Deploying a picklist with values that are numeric but have leading zeros results in the picklist value results in the leading zeros being stripped

Steps To Reproduce:

  1. Create a picklist field on an object with values ('001', '002')
  2. Retrieve the metadata in VS Code
  3. Deploy the field back to SalesForce

Expected result

The picklist values should retain the leading zeros. The picklist value set should be ('001', '002').

Actual result

The old picklist values ('001', '002') are moved to inactive values and new picklist values are created. The value set is ('1', '2').

Additional information

image

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): sfdx-cli/7.93.1-762bca056d win32-x64 node-v14.15.4

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core) @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.0 (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-trust 3.6.0 (core) alias 1.1.8 (core) auth 1.5.1 (core) config 1.2.7 (core) generator 1.1.5 (core) salesforcedx 50.13.3 (50.13.3) ├─ user 1.0.5 ├─ schema 1.0.3 ├─ salesforce-alm 50.13.1 ├─ templates 50.4.0 ├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 ├─ custom-metadata 1.0.11 ├─ apex 0.1.4 └─ limits 1.0.2 sfdx-cli 7.93.1 (core) telemetry 1.1.1 (core)

OS and version: Windows 10 version 20H2

github-actions[bot] commented 3 years ago

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.

GULP-CM commented 3 years ago

We had the same issues. But we don't think it's a bug with the cli it is more related to the vscode plugin as they enabled the experimental deploy retrieve feature with version 51.7.0 disabling this feature in the settgins fixed the issue in vscode.

image

https://github.com/forcedotcom/salesforcedx-vscode/blob/develop/packages/salesforcedx-vscode/CHANGELOG.md

github-actions[bot] commented 3 years ago

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 commented 2 years ago

I don't see this happening now. Please reopen if you do.