When deleting a subtask priority of the parent task does not become changeable again
How to reproduce this:
- Create a ticket
- Create a subtask to this ticket
- Set the subtask's priority to "high" or any other value
- Try to update the parent task ; priority cannot be changed (this is correct behavior as the parent's priority is calculated)
- Now, delete the subtask
- Try to update the parent task again ; priority still cannot be changed (this is a bug)
#4 Updated by Irfan Adilovic almost 7 years ago
+1 I've got the same problem too, with all fields that are calculated for parent tickets.
The problem can be traced to the
leaf? call which is provided by the
awesome_nested_set plugin. This in turn relies on the
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 almost 7 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
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).