scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
414 stars 112 forks source link

RecordType deletions are not being detected #891

Closed HyruleConsulting closed 2 months ago

HyruleConsulting commented 2 months ago

Issue verification check:

What is the problem?

I have noticed that deletion of Record Types are not being detected by the command and included in the destructiveChanges.xml output. Other metadata types seem to work fine though and this issue is specific to /recordTypes/*


What is the parameter and the value you used with it?

sf sgd source delta --from HEAD^1 --to HEAD --output .

What is the expected result?

destructiveChanges.xml `<?xml version="1.0" encoding="UTF-8"?>

Account.ABC_MyRecordType__c RecordType 61.0 ` ### What is the actual result? ` 61.0 ` ## Steps to reproduce --- delete a recordType from a valid sfdx project commit the deletion run `sf sgd source delta --from HEAD^1 --to HEAD --output .` check the destructiveChanges.xml to see if the record type was included ## Execution context --- **Operating System:** … MacOS (Sonama 14.5) **yarn version:** … 1.22.19 **node version:** … v20.10.0 **git version:** … git version 2.40.0 **sfdx version:** … @salesforce/cli/2.48.6 darwin-x64 node-v20.14.0 **sgd plugin version:** … sfdx-git-delta 5.40.2 ## More information (optional) ---
scolladon commented 2 months ago

Hi @HyruleConsulting !

Thanks for raising this issue and thanks for contributing in making this project better!

RecordTypes are not deleted because it is in fact not possible via metadata api...

We had to create a specific treatment to handle this use case (cf issue and related PR)

HyruleConsulting commented 2 months ago

Hi @scolladon Thank you for your response. We will make use of the --ignore-destructive flag and a .destructiveignore file then.

Many thanks for your work on this project, this is a fantastic tool. Closing for now

Kind regards Adam of Hyrule