mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
- Added 'status' as a reportable column (thanks to Peter De Poorter and Bryce Harrington). - Closed features pertaining to the 'task ids ... | task ...' (thanks to Bryce Harrington and Eric Fluger).
This commit is contained in:
parent
60a5d271f4
commit
f049ab3432
5 changed files with 26 additions and 7 deletions
|
@ -403,8 +403,8 @@ std::string Config::defaults =
|
|||
"\n"
|
||||
"# task all\n"
|
||||
"report.all.description=Lists all tasks matching the specified criteria, including parents of recurring tasks\n"
|
||||
"report.all.columns=id,project,priority,due,end,active,age,description\n"
|
||||
"report.all.labels=ID,Project,Pri,Due,Completed,Active,Age,Description\n"
|
||||
"report.all.columns=id,status,project,priority,due,end,active,age,description\n"
|
||||
"report.all.labels=ID,Status,Project,Pri,Due,Completed,Active,Age,Description\n"
|
||||
"report.all.sort=project+,due+,end+,priority-,active-,description+\n"
|
||||
"report.all.filter=status.not:deleted\n"
|
||||
"#report.all.dateformat=m/d/Y\n"
|
||||
|
|
|
@ -530,6 +530,19 @@ int handleCustomReport (const std::string& report, std::string& outs)
|
|||
}
|
||||
}
|
||||
|
||||
else if (*col == "status")
|
||||
{
|
||||
table.addColumn (columnLabels[*col] != "" ? columnLabels[*col] : "Status");
|
||||
table.setColumnWidth (columnCount, Table::minimum);
|
||||
table.setColumnJustification (columnCount, Table::left);
|
||||
|
||||
int row = 0;
|
||||
foreach (task, tasks)
|
||||
{
|
||||
table.addCell (row++, columnCount, task->statusToText (task->getStatus ()));
|
||||
}
|
||||
}
|
||||
|
||||
// Common to all columns.
|
||||
// Add underline.
|
||||
if ((context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) &&
|
||||
|
@ -698,7 +711,8 @@ void validReportColumns (const std::vector <std::string>& columns)
|
|||
*it != "description" &&
|
||||
*it != "wait" &&
|
||||
*it != "depends" &&
|
||||
*it != "urgency")
|
||||
*it != "urgency" &&
|
||||
*it != "status")
|
||||
bad.push_back (*it);
|
||||
|
||||
if (bad.size ())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue