Custom Reports
Task allows you to customize reports, to a limited degree. The "list", "long", "ls", "oldest" and "newest" reports are all now custom reports, whereas in previous releases of task they were not mutable. This means they can be modified, renamed, or deleted.
More importantly, you can define your own. Here are the three necessary items in the .taskrc file that define a new report:
report.mine.description=Just the essentials
report.mine.columns=id,project,priority,description
report.mine.sort=priority-,project+
This defines a report, called "mine", that has four columns: id, project, priority and description. It will be sorted on two columns: by descending priority then ascending project. The description that shows up in the task command usage page is "Just the essentials". Because this report is called "mine", it can be run with the command:
% task mine
An optional filter can also be specified like this:
report.mine.filter=priority:H +bug
This adds a filter so that only tasks with priority "H" and with the "bug" tag are included in the report. This filter definition is optional.
An optional limit can also be specified, which limits the number of tasks shown in the report. If a limit is not specified, then the number of tasks is not limited.
report.mine.limit=10
Here is a list of all the possible columns that may be included in a report:
It is also possible to override the default columns names, if the following line is added to your .taskrc file:
report.mine.labels=ID,Project,Priority,Description of task
Note that there must be the same number of labels as there are columns to label, and they must appear in the same sequence.
- id
- uuid
- project
- priority
- entry
- start
- due
- age
- active
- tags
- recur
- description_only
- description
- tag_indicator
- recurrence_indicator
Custom reports will show up in the task command line usage.
Copyright 2006-2009, P. Beckingham. All rights reserved.