mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Dependencies - #410
- Completed support for 'task 1 depends:2,-3' to manipulate the dependencies. - Now supports rc.dependency.reminder to indicate when to nag about dependency chain violations, defaulting to on. - Now supports rc.dependency.confirm to require confirmation before fixing dependency chains, defaulting to on. - New source file dependency.cpp which implements a low-level API for determining dependency status, and assorted handlers for task state changes. - Adds blocking tasks to the 'next' report. - Added more dependency unit tests, changed the wording in a couple of them and numbered them for easy reference.
This commit is contained in:
parent
dea7b72b70
commit
7fdfcbacc6
11 changed files with 230 additions and 140 deletions
|
@ -533,12 +533,19 @@ int handleCustomReport (const std::string& report, std::string &outs)
|
|||
table.setColumnJustification (columnCount, Table::left);
|
||||
|
||||
int row = 0;
|
||||
std::vector <int> all;
|
||||
std::vector <Task> blocked;
|
||||
std::vector <int> blocked_ids;
|
||||
std::string deps;
|
||||
foreach (task, tasks)
|
||||
{
|
||||
task->getDependencies (all);
|
||||
join (deps, ", ", all);
|
||||
dependencyGetBlocking (*task, blocked);
|
||||
foreach (b, blocked)
|
||||
blocked_ids.push_back (b->id);
|
||||
|
||||
join (deps, ",", blocked_ids);
|
||||
blocked_ids.clear ();
|
||||
blocked.clear ();
|
||||
|
||||
context.hooks.trigger ("format-depends", "depends", deps);
|
||||
table.addCell (row++, columnCount, deps);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue