mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
Dependency: Consistency
- Modified the ::getBlockingTasks and ::getBlockedTasks to match the code that performs the dependency scan. While this doesn't change functionality, it does align the logic.
This commit is contained in:
parent
7f3db8f201
commit
156357285c
1 changed files with 4 additions and 4 deletions
|
|
@ -44,8 +44,8 @@ void dependencyGetBlocked (const Task& task, std::vector <Task>& blocked)
|
||||||
|
|
||||||
auto all = context.tdb2.pending.get_tasks ();
|
auto all = context.tdb2.pending.get_tasks ();
|
||||||
for (auto& it : all)
|
for (auto& it : all)
|
||||||
if ((it.getStatus () == Task::pending ||
|
if (it.getStatus () != Task::completed &&
|
||||||
it.getStatus () == Task::waiting) &&
|
it.getStatus () != Task::deleted &&
|
||||||
it.has ("depends") &&
|
it.has ("depends") &&
|
||||||
it.get ("depends").find (uuid) != std::string::npos)
|
it.get ("depends").find (uuid) != std::string::npos)
|
||||||
blocked.push_back (it);
|
blocked.push_back (it);
|
||||||
|
|
@ -57,8 +57,8 @@ void dependencyGetBlocking (const Task& task, std::vector <Task>& blocking)
|
||||||
std::string depends = task.get ("depends");
|
std::string depends = task.get ("depends");
|
||||||
if (depends != "")
|
if (depends != "")
|
||||||
for (auto& it : context.tdb2.pending.get_tasks ())
|
for (auto& it : context.tdb2.pending.get_tasks ())
|
||||||
if ((it.getStatus () == Task::pending ||
|
if (it.getStatus () != Task::completed &&
|
||||||
it.getStatus () == Task::waiting) &&
|
it.getStatus () != Task::deleted &&
|
||||||
depends.find (it.get ("uuid")) != std::string::npos)
|
depends.find (it.get ("uuid")) != std::string::npos)
|
||||||
blocking.push_back (it);
|
blocking.push_back (it);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue