From d2e6c90446d231be955cd5c60137131f6034e049 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Thu, 26 Mar 2015 18:43:58 +0100 Subject: [PATCH] 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. --- ChangeLog | 3 +++ src/TDB2.cpp | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 058915883..2ec58ba4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ - TW-1578 Bash tab completion problems on first run (thanks to Renato Alves and Ptolemarch). - 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 amount of changes that is considered dangerous (thanks to Tomas Babej). diff --git a/src/TDB2.cpp b/src/TDB2.cpp index ab56a9683..0b35fdfd2 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -462,9 +462,13 @@ void TF2::dependency_scan () { if (right->get ("uuid") == *d) { - Task::status status = right->getStatus (); - if (status != Task::completed && - status != Task::deleted) + // GC hasn't run yet, check both tasks for their current status + Task::status lstatus = left->getStatus (); + Task::status rstatus = right->getStatus (); + if (lstatus != Task::completed && + lstatus != Task::deleted && + rstatus != Task::completed && + rstatus != Task::deleted) { left->is_blocked = true; right->is_blocking = true;