texei / sfdx-pull-issues

Improvement of force:source:pull to take care of known bugs
3 stars 0 forks source link

When a field translation is done and that a Managed Packaged with Report Types is installed, pulled metadata includes Report Type name without namespace, leading to failing deployment #16

Open FabienTaillon opened 1 year ago

FabienTaillon commented 1 year ago

Describe the bug When a field translation is done and that a Managed Packaged with Report Types is installed, pulled metadata includes Report Type name without namespace, leading to failing deployment

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo here: https://github.com/FabienTaillon/issue-prompt-translation
  2. Create a Scratch Org
  3. Push the metadata from the project to the Scratch Org
  4. Install a Managed Package with a Report Type, for instance Squivr (sf package install -p 04t8V000000ksxyQAA -w 60)
  5. Go to Setup/Translation Language Settings
  6. Add French to your own user
  7. Go to Setup/Translate
  8. Look for French/Custom Field/Account/Field Label
  9. Translate the field to Mon Champ
  10. Pull everything
  11. Recreate a new Scratch Org
  12. Push the metadata from the project to the new Scratch Org
  13. Push fails with a prompt error: In field: name - no ReportType named Contacts_with_Relationships found

This is because in the translation metadata (force-app/main/default/translations/fr.translation-meta.xml), the metadata name retrieved is Contacts_with_Relationships instead of squivr__Contacts_with_Relationships. The name used is not including the namespace, which makes the deployment fail. Changing the name in the metadata manually fixes the issues (but comes back everytime we update a translation and pull changes).

Expected behavior Translation metadata (force-app/main/default/translations/fr.translation-meta.xml) should be retrieved with the ReportType including the namespace.

FabienTaillon commented 1 year ago

Case #45113705 created.

FabienTaillon commented 1 year ago

Related Known Issue: https://issues.salesforce.com/issue/a028c00000gAwb8AAC