-
Notifications
You must be signed in to change notification settings - Fork 447
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
Fixed creation & deletion of relationships not working correctly & added same entity type relationship support #3060
Conversation
(cherry picked from commit 8e59b7d)
(cherry picked from commit e4b098e)
…ldn't arrive in the edit relationships component (cherry picked from commit 9f3ee32)
…orking-between-same-types_contribute-7.6' into w2p-113560_edit-item-add-relationships-one-by-one (cherry picked from commit 1c50dbf)
(cherry picked from commit cb59c05)
… the second submit onwards (cherry picked from commit 4541788)
…relationship types have changed (cherry picked from commit a658bf4)
(cherry picked from commit 479adf6)
- Fixed issue making it impossible to add new relationships until the page is refreshed after deleting an existing one (only when you refreshed the page after creating the initial relationship) - Fixed NPE in DsDynamicLookupRelationModalComponent - Grouped buttons on relationship page in order to assure that they always have the same behaviour
4167943
to
df80c33
Compare
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.
👍 Thank you @alexandrevryghem ! I gave this a review/test today. I've verified that the two bugs are fixed (#2978 and #2998). I've also tested relationships in the Submission form (both selecting existing entities & importing new ones) and editing them (add/delete) for archived items. Everything seems to be working well.
I didn't find an easy way to test #1511 (as there's no default entity relationship defined of that sort), but the code itself looks like it should work.
Because this solves the major bugs, I think this should be merged quickly. That said, I'll give @atarix83 a few days to review before merging.
These changes fix a bug where the selected status in the popup modal would stay cached even after adding and then removing a relationship without refreshing the page. And also fix a very small bug where the incorrect |
@alexandrevryghem : I'm retesting this today, and adding/removing relationships is now very buggy again. Here's what I'm doing:
This seemed to all work well before your last two changes. If necessary, I can retest tomorrow the older version of the code, to see if that's still working for me. |
e43bab3
to
9b0736c
Compare
…rking relationship ready for deletion
…ed in incorrect order
9b0736c
to
62e07e7
Compare
@tdonohue: I removed the commit that caused this issue. But that commit fixed the bug where the selected status of items in the popup modal were cached & also an issue where the save button wouldn't be disabled when it should be. If you want we can already merge this PR as is, and I can open an additional PR later to fix this (but that will probably only be next week). To reproduce the issue where the disabled button is still shown:
|
Thanks @alexandrevryghem . I think rolling back that change makes sense for now. It can be treated as a separate bug, as it seems less significant then the bugs this PR fixes. That said, please do send an additional PR if you find a way to solve that separate bug...as I'd definitely like to find a way to solve it in 8.0 if possible. I'll retest this later today and verify it's still working for me. |
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.
👍 Thanks @alexandrevryghem ! I can verify this is working again with your recent changes removed.
As for the new bug you are seeing, I'm not sure that I can reproduce it. But, perhaps I'm not understanding the steps involved. Here's what I tried:
- Go to a Publication with no Relationships. Edit it and go to "Relationships" tab
- Add 3 Person relationships. After saving in the popup window, all three appear on the Relationships tab & an green success notice appears.
- Now, on Relationships tab, click delete (trash icon) next to any of the new Person relationships. The Save button enables (as it should). Clicking "Save" will confirm the deletion. The page reloads and the relationship is removed.
In my opinion this is ready to be merged as-is. Any additional bugs can be addressed separately.
Merging immediately as this works well and fixes the major bugs. Follow-up work is welcome in a separate PR. @atarix83 : if you have feedback on this after OR2024, we can address that in follow-up work. |
References
Description
This component fixes various bugs related to the
Edit Item > Relationships
tab. This PR fixes the bugs preventing relationships to be created, adds support for adding relationships between the same type of entities and it also fixes the bug where removing a relationship while explicitly saying that you want to keep the virtual metadata as plaintext metadata fields.Instructions for Reviewers
List of changes in this PR:
EditItemRelationshipsService
EditRelationshipListComponent
that prevented thesubmitModal
to emit (which caused the modal never to close after clicking save)Checklist
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.