Defect #9577

Deleting a subtasks doesn't update parent's rgt & lft values

Added by Peter Höpfl about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:2011-11-15
Priority:HighDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:1.2.3
Resolution:Fixed Affected version:1.2.1

Description

Hi,

yesterday I ran into a similar error related to subtasks:
Lets say you have a ticket with lets say 10 subtickets.
Remove one of the subtickets.
After that the db fields "lft" and "rgt" in the issues table are corrupt, they do not get updated in a correct manner.
I investigated the problem and found out that the error seems to be in the plugin
"awesome_nested_set" that is used by redmine itself.
Onfortunatley the version packed with redmine is old and buggy but seems customized so a simple replace may not work. (I'm not sure).

See the history of awesome_nested_set at
https://github.com/collectiveidea/awesome_nested_set/commits/master/lib/awesome_nested_set.rb

The bug fixes "Prevent the set from getting corrupted when destroying nodes with children" and "Fixed parent_id_changed? problem." should fix the sub tasks corruption and maybe a few more bugs in redmine!

F.e. Defect #8716 is probably related to this.

Maybe someone knows how to update this essential library?


Related issues

Duplicates Defect #8716: When deleting a subtask priority of the parent task does ... Closed 2011-06-30

Associated revisions

Revision 7814
Added by Jean-Philippe Lang about 3 years ago

Fixed: Deleting a subtasks doesn't update parent's rgt & lft values, introduced by r5286 (#9577).

Revision 7815
Added by Jean-Philippe Lang about 3 years ago

Adds an option to force nested set rebuild (#9577).

Revision 8117
Added by Jean-Philippe Lang about 3 years ago

Merged r7814 from trunk (#9577).

History

#1 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from New to Confirmed
  • Assignee set to Jean-Philippe Lang

#2 Updated by Jean-Philippe Lang about 3 years ago

  • Subject changed from Subtasks get corrupt: Please update the plugin "awesome_nested_set" to Deleting a subtasks doesn't update parent's rgt & lft values
  • Category set to Issues
  • Target version set to 1.2.3

Fixed in r7814.

#3 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from Confirmed to Resolved
  • Resolution set to Fixed

#4 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from Resolved to Closed

Merged.

Also available in: Atom PDF