mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Output Cleanup
- No point display "blocked by" and "is blocking" in the info report if there are no other tasks to list.
This commit is contained in:
parent
80d1c03457
commit
03c9b96955
1 changed files with 9 additions and 6 deletions
|
@ -424,10 +424,11 @@ int handleInfo (std::string &outs)
|
|||
}
|
||||
|
||||
// dependencies: blocked
|
||||
row = table.addRow ();
|
||||
table.addCell (row, 0, "This task blocked by");
|
||||
if (task->has ("depends"))
|
||||
{
|
||||
row = table.addRow ();
|
||||
table.addCell (row, 0, "This task blocked by");
|
||||
|
||||
std::string depends = task->get ("depends");
|
||||
const std::vector <Task>& rpending = context.tdb.getAllPending ();
|
||||
|
||||
|
@ -442,9 +443,6 @@ int handleInfo (std::string &outs)
|
|||
|
||||
// dependencies: blocking
|
||||
{
|
||||
row = table.addRow ();
|
||||
table.addCell (row, 0, "This task is blocking");
|
||||
|
||||
std::string uuid = task->get ("uuid");
|
||||
const std::vector <Task>& rpending = context.tdb.getAllPending ();
|
||||
|
||||
|
@ -454,7 +452,12 @@ int handleInfo (std::string &outs)
|
|||
if (it->get ("depends").find (uuid) != std::string::npos)
|
||||
blocked << it->id << " " << it->get ("description") << "\n";
|
||||
|
||||
table.addCell (row, 1, blocked.str ());
|
||||
if (blocked.str().length ())
|
||||
{
|
||||
row = table.addRow ();
|
||||
table.addCell (row, 0, "This task is blocking");
|
||||
table.addCell (row, 1, blocked.str ());
|
||||
}
|
||||
}
|
||||
|
||||
if (task->getStatus () == Task::recurring ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue