Project

General

Profile

Actions

Patch #43607

open

Save parent issue only when derived attributes actually change

Added by Go MAEDA about 3 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Performance
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

When a subtask is updated, Issue#recalculate_attributes_for recalculates derived attributes of its parent issue (such as priority, start_date,due_date, and done_ratio) and always saves the parent issue.

In cases where the recalculated values are identical to the existing ones, this still triggers save callbacks and recursive ancestor updates, resulting in unnecessary database queries. This becomes noticeable when the issue has a deep ancestor chain.

The attached patch changes the behavior to save the parent issue only when it has actual changes after recalculation. This preserves current behavior when values change, while avoiding needless callback chains and database queries when they do not.


Files

No data to display

Actions

Also available in: Atom PDF