diff --git a/ChangeLog b/ChangeLog index a151c6c00..3b973d473 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,10 @@ country code. For example: holidays.en-US.rc. # Tracked Features, sorted by ID. + + Added feature #523 & #659, adding 'status' as a reportable field (thanks to + Peter De Poorter and Bryce Harrington). + + Added feature #657 & #658, using the 'ids' command, tasks matching a filter + can now be modified as a group (thanks to Bryce Harrington, Eric Fluger). + Added feature #700, which adds tab-completion of built-in tags. + Added feature #710, which adds an attribute modifier prefix to return the complement of a filtered set (thanks to Dan White). diff --git a/NEWS b/NEWS index ba7f02473..a8a66d69d 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ New Features in taskwarrior 2.0.0 allows commands like: echo 'add Pay the bills' | task - Attribute modifiers may be prefixed with '~' to return the opposite of a filter's results. + - Status attribute can now be used in report. Please refer to the ChangeLog file for full details. There are too many to list here. diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 6cfc47c8d..655bb7adc 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -894,10 +894,10 @@ The description for report X when running the "task help" command. .TP .B report.X.columns The columns that will be used when generating the report X. Valid columns are: -id, uuid, project, priority, priority_long, entry, start, end, due, countdown, -countdown_compact, age, age_compact, active, tags, depends, description_only, -description, recur, recurrence_indicator, tag_indicator and wait. -The IDs are separated by commas. +id, uuid, status, project, priority, priority_long, entry, start, end, due, +countdown, countdown_compact, age, age_compact, active, tags, depends, +description_only, description, recur, recurrence_indicator, tag_indicator and +wait. The IDs are separated by commas. .TP .B report.X.labels diff --git a/src/Config.cpp b/src/Config.cpp index 90c111c6d..a0099cf55 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -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" diff --git a/src/custom.cpp b/src/custom.cpp index 6509ebb2c..d2a04337d 100644 --- a/src/custom.cpp +++ b/src/custom.cpp @@ -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 & columns) *it != "description" && *it != "wait" && *it != "depends" && - *it != "urgency") + *it != "urgency" && + *it != "status") bad.push_back (*it); if (bad.size ())