-
Notifications
You must be signed in to change notification settings - Fork 78
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
sfdx package version create
removes fieldPermissions from Profiles too aggressively
#2278
Comments
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. |
sfdx package version create
removes fieldPermissions and objectPermission from Profiles too aggressivelysfdx package version create
removes fieldPermissions from Profiles too aggressively
@amtrack that's an excellent repro, thank you. |
This issue has been linked to a new work item: W-13753544 |
Hi @amtrack - I've been testing Shane's changes out with your provided repo and everything is looking great. This turned into a larger change than we had initially thought and I was hoping you might help us test it on some more complex package setups. Can you can install the fixed plugin by running you can verify the installation matches by comparing the ➜ sf plugins
packaging 1.21.5-profiles.1 (profiles) and once you're done testing, you can run |
@WillieRuemmele I just tried with the I don't see any more logs regarding In my reproduction repo, creating a package version succeeds and I can spot the following log lines:
I can also confirm that changing For our real package I could see that our 2
--> I found a small bug on the PR forcedotcom/packaging#348 and proposed a fix: |
Thanks for looking into this @amtrack - I saw those new log lines using your repro as well, and that's because the CLI is now stripping them out, before sending them to the server. But according to these docs we found https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_profiles.htm, the server removes them as well Could you elaborate more on
Is that a bug in the the proposed changes? Where did you change |
@WillieRuemmele OK, thanks for the explanation.
Sorry I meant I just wanted to confirm that this config still works correctly after your refactoring :-). So there is nothing to act on. |
Summary
We have some CustomFields on
Activity
.force-app/main/default/objects/Activity/fields/Event_Field__c.field-meta.xml
force-app/main/default/objects/Activity/fields/Task_Field__c.field-meta.xml
However the field permissions for CustomFields of
Activity
in Profiles are stored onEvent
orTask
:Dummy Profile.profile-meta.xml
These
fieldPermissions
are being deleted when creating a package version because sfdx can't find the metadata in the project.Extracted from
~/.sf/sf.log
when usingSF_LOG_LEVEL="debug"
:Steps To Reproduce
https://github.com/mdapi-issues/mre-2gp-profile-filtering
Expected result
The
<fieldPermissions>
should not be removed in this case.The implementation in https://github.com/forcedotcom/packaging/blob/main/src/package/packageProfileApi.ts should be aware of the
Activity/Event/Task
model.Actual result
The
<fieldPermissions>
are being removed incorrectly.System Information
Additional information
The text was updated successfully, but these errors were encountered: