mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Dependencies
- Added 'depends' to Config.cpp. - Added formatting for the 'depends' column. - Added notes to t.t.cpp regarding missing tests.
This commit is contained in:
parent
90c40dbebf
commit
93e862b367
3 changed files with 34 additions and 7 deletions
|
@ -226,10 +226,10 @@ std::string Config::defaults =
|
||||||
"alias.export=export.csv # Prefer CSV over iCal export\n"
|
"alias.export=export.csv # Prefer CSV over iCal export\n"
|
||||||
"alias.export.vcalendar=export.ical # They are the same\n"
|
"alias.export.vcalendar=export.ical # They are the same\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# Fields: id,uuid,project,priority,priority_long,entry,entry_time,\n" // TODO
|
"# Fields: id, uuid, project, priority, priority_long, entry, entry_time,\n"
|
||||||
"# start,entry_time,due,recur,recurrence_indicator,age,\n" // TODO
|
"# start, start_time, end, end_time, due, countdown, countdown_compact,\n"
|
||||||
"# age_compact,active,tags,tag_indicator,description,\n" // TODO
|
"# age, age_compact, active, tags, depends, description_only,\n"
|
||||||
"# description_only,end,end_time,countdown,countdown_compact\n" // TODO
|
"# description, recur, recurrence_indicator, tag_indicator, wait.\n"
|
||||||
"# Description: This report is ...\n"
|
"# Description: This report is ...\n"
|
||||||
"# Sort: due+,priority-,project+\n"
|
"# Sort: due+,priority-,project+\n"
|
||||||
"# Filter: pro:x pri:H +bug limit:10\n"
|
"# Filter: pro:x pri:H +bug limit:10\n"
|
||||||
|
@ -237,8 +237,8 @@ std::string Config::defaults =
|
||||||
"\n"
|
"\n"
|
||||||
"# task long\n"
|
"# task long\n"
|
||||||
"report.long.description=Lists all task, all data, matching the specified criteria\n"
|
"report.long.description=Lists all task, all data, matching the specified criteria\n"
|
||||||
"report.long.columns=id,project,priority,entry,start,due,recur,countdown,age,tags,description\n"
|
"report.long.columns=id,project,priority,entry,start,due,recur,countdown,age,depends,tags,description\n"
|
||||||
"report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Countdown,Age,Tags,Description\n"
|
"report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Countdown,Age,Deps,Tags,Description\n"
|
||||||
"report.long.sort=due+,priority-,project+\n"
|
"report.long.sort=due+,priority-,project+\n"
|
||||||
"report.long.filter=status:pending\n"
|
"report.long.filter=status:pending\n"
|
||||||
"#report.long.dateformat=m/d/Y\n"
|
"#report.long.dateformat=m/d/Y\n"
|
||||||
|
|
|
@ -591,6 +591,24 @@ int handleCustomReport (const std::string& report, std::string &outs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (*col == "depends")
|
||||||
|
{
|
||||||
|
table.addColumn (columnLabels[*col] != "" ? columnLabels[*col] : "Deps");
|
||||||
|
table.setColumnWidth (columnCount, Table::minimum);
|
||||||
|
table.setColumnJustification (columnCount, Table::left);
|
||||||
|
|
||||||
|
int row = 0;
|
||||||
|
std::vector <int> all;
|
||||||
|
std::string deps;
|
||||||
|
foreach (task, tasks)
|
||||||
|
{
|
||||||
|
task->getDependencies (all);
|
||||||
|
join (deps, " ", all);
|
||||||
|
context.hooks.trigger ("format-depends", "depends", deps);
|
||||||
|
table.addCell (row++, columnCount, deps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Common to all columns.
|
// Common to all columns.
|
||||||
// Add underline.
|
// Add underline.
|
||||||
if ((context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) &&
|
if ((context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) &&
|
||||||
|
@ -752,7 +770,8 @@ void validReportColumns (const std::vector <std::string>& columns)
|
||||||
*it != "tag_indicator" &&
|
*it != "tag_indicator" &&
|
||||||
*it != "description_only" &&
|
*it != "description_only" &&
|
||||||
*it != "description" &&
|
*it != "description" &&
|
||||||
*it != "wait")
|
*it != "wait" &&
|
||||||
|
*it != "depends")
|
||||||
bad.push_back (*it);
|
bad.push_back (*it);
|
||||||
|
|
||||||
if (bad.size ())
|
if (bad.size ())
|
||||||
|
|
|
@ -140,11 +140,19 @@ int main (int argc, char** argv)
|
||||||
/*
|
/*
|
||||||
|
|
||||||
TODO Task::composeCSV
|
TODO Task::composeCSV
|
||||||
|
TODO Task::composeYAML
|
||||||
TODO Task::id
|
TODO Task::id
|
||||||
TODO Task::*Status
|
TODO Task::*Status
|
||||||
TODO Task::*Tag*
|
TODO Task::*Tag*
|
||||||
TODO Task::*Annotation*
|
TODO Task::*Annotation*
|
||||||
|
|
||||||
|
TODO Task::addDependency
|
||||||
|
TODO Task::addDependency
|
||||||
|
TODO Task::removeDependency
|
||||||
|
TODO Task::removeDependency
|
||||||
|
TODO Task::getDependencies
|
||||||
|
TODO Task::getDependencies
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Task::operator==
|
// Task::operator==
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue