Deleting a note leaves orphaned logs and comments in database

Created on 9 September 2025, 23 days ago

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

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India neerajsingh IN 🇮🇳

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024