Skip to content
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

Cannot Delete an Entity which has Relationships #3068

Closed
tdonohue opened this issue May 21, 2024 · 2 comments · Fixed by #3079
Closed

Cannot Delete an Entity which has Relationships #3068

tdonohue opened this issue May 21, 2024 · 2 comments · Fixed by #3079
Assignees
Labels
bug component: configurable entities related to configurable entities high priority testathon Reported by a tester during Community Testathon
Milestone

Comments

@tdonohue
Copy link
Member

tdonohue commented May 21, 2024

Describe the bug
If you attempt to delete an Entity which has existing relationships, the Delete page will hang indefinitely and you will not be able to complete the deletion or exit the page.

To Reproduce
Steps to reproduce the behavior:

  1. Find an Entity which has at least one relationship (e.g. a Publication linked to a Person, or a Person linked to a Publication)
  2. Login as an Admin
  3. Edit that Entity
  4. Go to the "Status" tab
  5. Click "Permanently delete" button
  6. You will see the "Delete Item" page. But, you will be unable to interact with the system any longer. The page will become unresponsive and the buttons at the bottom & links in the header will no longer work.
    • At this point, you have to close your tab/window to interact with the application again.

This issue ONLY impacts 8.x and is reproducible on https://sandbox.dspace.org/
Deletion of Entities works fine on https://demo.dspace.org/ (running 7.6.x)

Expected behavior
It should be possible to delete Entities that have relationships, just as you could in 7.x

@tdonohue tdonohue added bug component: configurable entities related to configurable entities high priority testathon Reported by a tester during Community Testathon labels May 21, 2024
@tdonohue tdonohue added this to the 8.0 milestone May 21, 2024
@tdonohue
Copy link
Member Author

@alexandrevryghem and @artlowel : Pinging you on this new issue as it may be semi-related to #3060 . This bug is not about creation of relationships though, but rather about deletion. If you want to claim it, let me know. I think we have to fix this in 8.0 as it's no longer possible to delete Entities until you first remove all relationships.

@artlowel
Copy link
Member

@tdonohue I investigated this issue. You're right in saying that it's similar to #3060, but unfortunately the fix will also be similar in scale. We basically need to refactor item-delete.component.html to get all the direct function calls out of it. Calling functions from HTML always used to be problematic for performance, so I don't think this is a new bug in DSpace 8, but it seems that with the update to Angular 17 these sorts of issues have become more severe. It used to be slow, now it breaks the page.

I won't have time to work on this before OR. I could try to get it on Alex's plate for next week, but given the complexity I wouldn't expect a PR before the second half of next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: configurable entities related to configurable entities high priority testathon Reported by a tester during Community Testathon
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants