Defect #8716

When deleting a subtask priority of the parent task does not become changeable again

Added by Jan from Planio www.plan.io over 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:2011-06-30
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution: Affected version:1.2.0

Description

How to reproduce this:

  1. Create a ticket
  2. Create a subtask to this ticket
  3. Set the subtask's priority to "high" or any other value
  4. Try to update the parent task ; priority cannot be changed (this is correct behavior as the parent's priority is calculated)
  5. Now, delete the subtask
  6. Try to update the parent task again ; priority still cannot be changed (this is a bug)

Related issues

Duplicated by Redmine - Defect #9577: Deleting a subtasks doesn't update parent's rgt & lft values Closed 2011-11-15

History

#1 Updated by Etienne Massip over 6 years ago

  • Target version set to Candidate for next minor release

Confirmed.

#2 Updated by Mischa The Evil over 6 years ago

This might be related to #6847 and it's related issues (especially #5880)...

#3 Updated by Andy Dufilie about 6 years ago

I've created a pull request here to fix this issue.

#4 Updated by Irfan Adilovic about 6 years ago

+1 I've got the same problem too, with all fields that are calculated for parent tickets.

Tickets #6847 and #5880 should be unrelated to this ticket.

The problem can be traced to the leaf? call which is provided by the awesome_nested_set plugin. This in turn relies on the lft and rgt fields of the issue, which are apparently not updated when a child is lost. Andy Dufilie's patch on github seems to do The Right Thing by forcing an update of these fields upon deletion.

#5 Updated by Irfan Adilovic about 6 years ago

For those trying out Andy's patch: I can confirm it works, but with the following caveat:

Tickets whose fields you once made uneditable due to child creation and deletion will not be fixed by this patch, nor by re-creating and re-deleting a child for such a ticket.

You may try to manually fix the lft and rgt fields, but this is not obvious to me for a deeply nested leaf ticket; or you may duplicate the ticket and delete the old one (beware if your ticket has been referenced a lot).

#6 Updated by Dave Lowndes about 6 years ago

I would really like to see this given a higher priority as having critical issues changed in priority to low automatically via the subtasking logic and and not being able to change them back is awful for reporting and production management purposes.

#7 Updated by Mischa The Evil almost 6 years ago

  • Status changed from New to Confirmed
  • Priority changed from Normal to High

#8 Updated by Mischa The Evil almost 6 years ago

D@mn, now I remember seeing r7814 for #9577. I'll test later if this got actually fixed already.

#9 Updated by Mischa The Evil almost 6 years ago

  • Status changed from Confirmed to Closed
  • Target version deleted (Candidate for next minor release)

I can confirm this issue is fixed with r7814 and r7815 thus making this issue superseded by #9577. I'll add an issue-relation for clarity.

Also available in: Atom PDF