mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Feature #800
- Added feature #800, adding a new command 'columns' that lists all the columns available for custom reports, and includes their formatting options (thanks to T. Charles Yun).
This commit is contained in:
parent
3a5370ddf1
commit
27a04b29f5
28 changed files with 372 additions and 64 deletions
|
@ -39,8 +39,14 @@ ColumnPriority::ColumnPriority ()
|
|||
{
|
||||
_name = "priority";
|
||||
_type = "string";
|
||||
_style = "default";
|
||||
_style = "short";
|
||||
_label = STRING_COLUMN_LABEL_PRI;
|
||||
|
||||
_styles.push_back ("short");
|
||||
_styles.push_back ("long");
|
||||
|
||||
_examples.push_back ("H");
|
||||
_examples.push_back ("High");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -86,7 +92,8 @@ void ColumnPriority::measure (Task& task, int& minimum, int& maximum)
|
|||
else if (priority == "M") minimum = maximum = 6;
|
||||
else if (priority == "L") minimum = maximum = 3;
|
||||
}
|
||||
else if (_style != "default")
|
||||
else if (_style != "default" &&
|
||||
_style != "short")
|
||||
throw format (STRING_COLUMN_BAD_FORMAT, "priority", _style);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue