Skip to content

Fix/1783 (feedback): prevent error when editing child comment after parent deletion - #1786

Open
MusaleTejas wants to merge 1709 commits into
rtCamp:version-16from
MusaleTejas:fix/1783-edit-comment-error
Open

Fix/1783 (feedback): prevent error when editing child comment after parent deletion#1786
MusaleTejas wants to merge 1709 commits into
rtCamp:version-16from
MusaleTejas:fix/1783-edit-comment-error

Conversation

@MusaleTejas

Copy link
Copy Markdown

Description

When a parent comment is deleted, its child comments are elevated in the hierarchy. However, their custom_reply_to field in the database remains pointed to the now-deleted parent comment. This dangling reference causes a validation error (database integrity check) when trying to edit the child comment later.

This PR resolves the issue by:

  1. Adding an on_trash doc_event handler for the Comment DocType.
  2. When a comment is deleted, all of its direct replies have their custom_reply_to pointer updated to the deleted comment's own parent (or set to None if it was a root comment), cleaning up the dangling references.

ayushnirwal and others added 30 commits June 29, 2026 19:50
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
PraveenKum11 and others added 30 commits July 7, 2026 11:32
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
* feat: Timesheet Rejection Reason

* chore: remove holiday list from tests setup
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
fix: team allocation page QA issues
…disambiguation

Improve customer abbreviation generation and collision handling
QA Fix: Updating a filtered time entry reveals tasks excluded by the active search filter
feat: validate resource allocation against cancelled projects and disabled customers
feat: block overlapping allocation
* feat: timesheet api returns the rejected reason

* chore: generalize tests
When a project is chosen in the add/edit allocation modal, the employee
combobox now only lists that project's shared members (same DocShare-based
membership the project sidebar uses) instead of every employee.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants