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

Where a field is renamed the pull don't change field file name #2

Open
mguemmar opened this issue Sep 9, 2020 · 4 comments
Open

Where a field is renamed the pull don't change field file name #2

mguemmar opened this issue Sep 9, 2020 · 4 comments
Labels
change not tracked on org Change in Org isn't tracked correctly in SourceMember

Comments

@mguemmar
Copy link

mguemmar commented Sep 9, 2020

Describe the bug
When you rename field API Name, the field with the new api name is not pulled and the existing field in repo is deleted
To Reproduce
Steps to reproduce the behavior:

  • Rename field name , for exemple : from "myField__c" to "MyField__c" in MyCustoObject__c
  • After pull : the original field "myField__c" is deleted in repo (the file "myField__c.field-meta.xml" is deleted) and the new field "MyField__c" is not pulled (the file "MyField__c.field-meta.xml" is not created as expected)
  • The next push generate this kind of error
    Error force-app/main/default/objects/MyCustoObject__c.object-meta.xml Not in package.xml

Expected behavior
after rename field , the sfdx must rename the file name in repo like when the field is retrieved for first time.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context
It possible that problem is related to git file management.
I tried the Git Option : git config core.ignorecase false without success

Desktop (please complete the following information):

  • OS: [e.g. iOS]

  • sfdx version :
    @oclif/plugin-autocomplete 0.1.5 (core)
    @oclif/plugin-commands 1.3.0 (core)
    @oclif/plugin-help 3.1.0 (core)
    @oclif/plugin-not-found 1.2.4 (core)
    @oclif/plugin-plugins 1.9.0 (core)
    @oclif/plugin-update 1.3.10 (core)
    @oclif/plugin-warn-if-update-available 1.7.0 (core)
    @oclif/plugin-which 1.0.3 (core)
    @salesforce/sfdx-trust 3.2.1 (core)
    analytics 1.12.0 (core)
    config 1.1.6 (core)
    generator 1.1.3 (core)
    salesforcedx 49.8.0 (core)
    ├─ templates 49.4.4 (core)
    ├─ custom-metadata 1.0.8 (core)
    ├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
    └─ salesforce-alm 49.8.0 (core)
    sfdx-cli 7.72.0 (core)
    shane-sfdx-plugins 4.39.2
    texei-sfdx-plugin 1.6.2

  • nodejs version : v6.11.3

@mguemmar mguemmar added the change not tracked on org Change in Org isn't tracked correctly in SourceMember label Sep 9, 2020
@FabienTaillon FabienTaillon added enhancement New feature or request and removed change not tracked on org Change in Org isn't tracked correctly in SourceMember labels Sep 9, 2020
@mguemmar mguemmar changed the title Where a field is renamed the pull dont change field file name Where a field is renamed the pull don't change field file name Sep 9, 2020
@FabienTaillon
Copy link
Member

So this is a bug on Salesforce platform side (not the CLI).

When I rename a field, for instance adding a word, I can see in the SourceMember table (used to track what has changed in the org) that 2 lines are there:

  • One with the old name, deleted (IsNameObsolete = true)
  • One with the new name

full rename

However, when the rename is just the same name with different case, I only have one line for the field deletion.

case sensitive rename

So this one is definitely harder for us to fix.
What we could do is, every time a field is deleted, query the org to describe the fields of the sObject, and if there is a field with the same name, retrieve it.

I'll try to open a case for it too.

@FabienTaillon
Copy link
Member

There is also this Known Issue but a little bit different, as I am able to see the deleted field:
https://trailblazer.salesforce.com/issues_view?id=a1p3A000001SGRAQA4

@FabienTaillon
Copy link
Member

Case #27514495 created.

@FabienTaillon
Copy link
Member

Work Item W-8114661 created on Salesforce side.

@FabienTaillon FabienTaillon added change not tracked on org Change in Org isn't tracked correctly in SourceMember and removed enhancement New feature or request labels Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change not tracked on org Change in Org isn't tracked correctly in SourceMember
Projects
None yet
Development

No branches or pull requests

2 participants