TW-1581: Wrong urgency after done/delete command

- TDB2::dependency_scan() is run before GC, so we need to check both
  tasks in a dependency chain for their status before setting the
  blocking/blocked flag to true.
This commit is contained in:
Wilhelm Schuermann
2015-03-26 18:43:58 +01:00
parent 96922231b8
commit d2e6c90446
2 changed files with 10 additions and 3 deletions

View File

@@ -3,6 +3,9 @@
- TW-1578 Bash tab completion problems on first run - TW-1578 Bash tab completion problems on first run
(thanks to Renato Alves and Ptolemarch). (thanks to Renato Alves and Ptolemarch).
- TW-1580 "modified" attribute no longer updated (thanks to David Patrick). - TW-1580 "modified" attribute no longer updated (thanks to David Patrick).
- TW-1581 Tasks with dependencies show wrong urgency values for the first
report run after a task in the dependency chain is completed/deleted (thanks
to Ulf Eliasson).
- Setting 'bulk' to zero is interpreted as infinity, which means there is no - Setting 'bulk' to zero is interpreted as infinity, which means there is no
amount of changes that is considered dangerous (thanks to Tomas Babej). amount of changes that is considered dangerous (thanks to Tomas Babej).

View File

@@ -462,9 +462,13 @@ void TF2::dependency_scan ()
{ {
if (right->get ("uuid") == *d) if (right->get ("uuid") == *d)
{ {
Task::status status = right->getStatus (); // GC hasn't run yet, check both tasks for their current status
if (status != Task::completed && Task::status lstatus = left->getStatus ();
status != Task::deleted) Task::status rstatus = right->getStatus ();
if (lstatus != Task::completed &&
lstatus != Task::deleted &&
rstatus != Task::completed &&
rstatus != Task::deleted)
{ {
left->is_blocked = true; left->is_blocked = true;
right->is_blocking = true; right->is_blocking = true;