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

Command icon 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:

Comments

neerajsingh created an issue. See original summary.

neerajsingh’s picture

Assigned: Unassigned » neerajsingh

neerajsingh changed the visibility of the branch 3545673-clean-logs-comments to hidden.

neerajsingh changed the visibility of the branch 3545673-clean-logs-comments to active.

neerajsingh changed the visibility of the branch 3545673-clean-logs-comments to hidden.

  • neerajsingh committed 6be89c8e on 1.0.x
    Issue #3545673 by neerajsingh: Deleting a note leaves orphaned logs and...
neerajsingh’s picture

Status: Active » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

neerajsingh’s picture

Assigned: neerajsingh » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.