Problem/Motivation
When a reviewer note is deleted, the deletion process only removes the record from the reviewer_notes table but fails to cascade delete related records from reviewer_notes_log and reviewer_notes_comment tables. This results in orphaned data accumulation over time and potential performance issues.
Steps to reproduce
- Create a reviewer note with comments and activity logs
- Delete the note through the UI
- Check database: records still exist in reviewer_notes_log and reviewer_notes_comment tables with the deleted note's ID
Proposed resolution
Deleting a note should cascade delete all related logs and comments to maintain data consistency and prevent orphaned records.
Remaining tasks
Trigger delete on logs and comments too, while the notes are getting deleted.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Issue fork reviewer_notes-3545673
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3545673-clean-note-delete
changes, plain diff MR !17
- 3545673-clean-logs-comments
compare
Comments
Comment #2
neerajsinghComment #8
neerajsinghComment #10
neerajsingh