-
Notifications
You must be signed in to change notification settings - Fork 502
Submission - Replace plaintext with relationship on lookup - main #4911
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
base: main
Are you sure you want to change the base?
Submission - Replace plaintext with relationship on lookup - main #4911
Conversation
…cts-queue' into w2p-136580_Replace-plaintext-relationship-7.6
…aintext-relationship-main
jrcwiok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Start a submission and for a relationship-controlled field (e.g. author), create multiple plain-text values
- Start a lookup from one of the plain-text value
- Select a couple new relationships in the lookup modal (at least two)
- Close the lookup
- Verify the plain-text value you started the lookup from is not present anymore
- Verify the first selected relationship is placed where the removed plain-text value was
- Verify all other selected relationships are placed at the end of the list
I interpreted the steps as the following:
I tested on the metadata tab using the author element. I entered plain text author names, clicked on the lookup, and replaced with a value in the list.
…-136580_Replace-plaintext-relationship-main
|
Some clarification to my latest changes: There was a bug with selecting multiple relationships in one action (e.g. selecting the entire page of results at once, using the dropdown). The modal would emit
This caused the multiple select to behave in very strange ways, where only one of the selected objects would actually be selected, the others were ignored. The easiest fix here is to remove the manual emission that |
References
Description
This PR changes the submission relationship lookup to make the (first) selected relationship replace the plain text value the lookup started from, if it did.
Instructions for Reviewers
Technical details:
ReplaceRelationshipActionwill be created instead of the usualAddRelationshipAction. This only happens for the first selected relationship, the rest sends aAddRelationshipActionfor each selection.ReplaceRelationshipAction:How to test:
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.