DSpace / DSpace

(Official) The DSpace digital asset management system that powers your Institutional Repository
https://wiki.lyrasis.org/display/DSDOC7x/
BSD 3-Clause "New" or "Revised" License
853 stars 1.29k forks source link

Ensure Process `user_id` is nullified when referenced EPerson is deleted #9551

Closed tdonohue closed 1 month ago

tdonohue commented 1 month ago

References

Description

When an EPerson who created a Process is deleted, a reference to the deleted EPerson remains in the process user_id column. This fixes that by nullifying any references to deleted EPerson objects and adding a constraint to ensure they are nullified automatically in the future.

Also fixes a bug in ProcessConverter to ensure when EPerson is null, a NullPointerException doesn't occur.

Instructions for Reviewers

tdonohue commented 1 month ago

Tested this thoroughly with https://github.com/DSpace/dspace-angular/pull/3014#pullrequestreview-2046442914 as this PR is required to fix all bugs previously reported in https://github.com/DSpace/dspace-angular/pull/3014#pullrequestreview-2044224424

Merging immediately as it's required for https://github.com/DSpace/dspace-angular/pull/3014

dspace-bot commented 1 month ago

Successfully created backport PR for dspace-7_x: