Made the labels in edit relationships tab unique #3307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, the relationship type labels are not unique and don't work well when the relationship type is not in the form
is{Entity1}Of{Entity2}
. This PR ensures they are unique by including the two entity types and the relationship type in the label.Instructions for Reviewers
List of changes in this PR:
getRelationshipMessageKey
works by always forming the labels in the form:relationships.${currentEntityType}.${relationshipType}.${relatedEntityType}
(both entity types are required in order to support the use case from Entities relations with invalid associations shown #1387)Publication
label on the OrgUnit's edit relationship tab to:Organisation Publications
&Authored Publications
Guidance for how to test or review this PR:
dspace/config/entities/relationship-types.xml
)Checklist
main
branch of code (unless it is a backport or is fixing an issue specific to an older branch).yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.