The way to handle external ref is inconsistent
Description
We had a bug to fix the behavior of external references in reports. As mentioned in this comment of the same ticket, the behavior of enforcing reference is bigger.
Environment
Demo
Reproducible Steps
Edit an entity while having external reference
- Have external reference enforced for your entity
- Click on an entity (ex report) that have an external reference
- Click on edit
- Click on the field external ref
- You only see the external ref of the report, not the full list of external refs of your platform and cannot select existing ones already created that do not pertains to your entity.
Expected output: You should see the list of all the external refs to be able to add another one.
Sharing entity to an org
- Have external reference enforced for your entity
- Click on an entity (ex report) that have an external reference enforced
- Click on share to org
- select an org
- You got an error message because you have not added any external ref
Expected output: It would help if you were prompted the pop up to add an external ref instead of having an error message.
Remove all external references while enforce external reference is enabled
- Have external reference enforced for your entity
- Click on an entity (ex report) that have an external reference enforced and have some external ref
- Remove all external ref
Expected output: You should not be able to remove all external ref. At least always 1 external ref must remains in the entity.
Adding relations (core ) is sometimes possible without having to add an external ref
- Have external reference enforced for your entity
- Go to your entity and click on add relation
Expected output: You should not be able to add a relation without adding an external ref. The pop up must be pormpted if not in the form.
/!\ All this bug fix MUST be covered by e2e testing