mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancements - custom reports
- Converted active, overdue and completed reports to custom reports. - Added new recurring report. - Added support for new 'end' column, which is the completion date.
This commit is contained in:
parent
c9807f4636
commit
788e264378
6 changed files with 69 additions and 375 deletions
|
@ -199,6 +199,25 @@ std::string handleCustomReport (const std::string& report)
|
|||
}
|
||||
}
|
||||
|
||||
else if (*col == "end")
|
||||
{
|
||||
table.addColumn (columnLabels[*col] != "" ? columnLabels[*col] : "Completed");
|
||||
table.setColumnWidth (columnCount, Table::minimum);
|
||||
table.setColumnJustification (columnCount, Table::right);
|
||||
|
||||
std::string started;
|
||||
for (unsigned int row = 0; row < tasks.size(); ++row)
|
||||
{
|
||||
started = tasks[row].get ("end");
|
||||
if (started.length ())
|
||||
{
|
||||
Date dt (::atoi (started.c_str ()));
|
||||
started = dt.toString (context.config.get ("dateformat", "m/d/Y"));
|
||||
table.addCell (row, columnCount, started);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (*col == "due")
|
||||
{
|
||||
table.addColumn (columnLabels[*col] != "" ? columnLabels[*col] : "Due");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue