mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-241
- TW-241 new column format; recur.short. - All duration columns now default to compact ISO duration format.
This commit is contained in:
parent
d33de636f1
commit
861cc83e6d
4 changed files with 19 additions and 16 deletions
|
@ -43,6 +43,7 @@
|
|||
Muller).
|
||||
- TW-221 Migrate task-faq man page to the Wiki.
|
||||
- TW-230 Filter tasks on partial UUIDs (thanks to Paul Kishimoto).
|
||||
- TW-241 new column format; recur.short.
|
||||
- TW-242 extra Space when annotating a path/filename, taskopen can not open the
|
||||
file (thanks to Andreas Kalex).
|
||||
- TW-244 task add "Description (Information)" results in
|
||||
|
|
|
@ -82,7 +82,7 @@ void ColumnRecur::measure (Task& task, unsigned int& minimum, unsigned int& maxi
|
|||
if (_style == "default" ||
|
||||
_style == "duration")
|
||||
{
|
||||
minimum = maximum = Duration (task.get ("recur")).formatCompact ().length ();
|
||||
minimum = maximum = Duration (task.get ("recur")).formatISO ().length ();
|
||||
}
|
||||
else if (_style == "indicator")
|
||||
{
|
||||
|
@ -99,6 +99,8 @@ void ColumnRecur::render (
|
|||
Task& task,
|
||||
int width,
|
||||
Color& color)
|
||||
{
|
||||
if (task.has (_name))
|
||||
{
|
||||
if (_style == "default" ||
|
||||
_style == "duration")
|
||||
|
@ -106,16 +108,16 @@ void ColumnRecur::render (
|
|||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (
|
||||
Duration (task.get ("recur")).formatCompact (),
|
||||
Duration (task.get ("recur")).formatISO (),
|
||||
width)));
|
||||
}
|
||||
else if (_style == "indicator")
|
||||
{
|
||||
if (task.has (_name))
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (context.config.get ("recurrence.indicator"), width)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -103,7 +103,7 @@ void ColumnUDA::measure (Task& task, unsigned int& minimum, unsigned int& maximu
|
|||
}
|
||||
else if (_type == "duration")
|
||||
{
|
||||
minimum = maximum = utf8_width (Duration (value).formatCompact ());
|
||||
minimum = maximum = utf8_width (Duration (value).formatISO ());
|
||||
}
|
||||
else if (_type == "string")
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ void ColumnUDA::render (
|
|||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (
|
||||
Duration (value).formatCompact (),
|
||||
Duration (value).formatISO (),
|
||||
width)));
|
||||
}
|
||||
else if (_type == "string")
|
||||
|
|
|
@ -55,7 +55,7 @@ if (open my $fh, '>', $rc)
|
|||
qx{../src/task rc:$rc add with extra:1day 2>&1};
|
||||
qx{../src/task rc:$rc add without 2>&1};
|
||||
my $output = qx{../src/task rc:$rc uda 2>&1};
|
||||
like ($output, qr/1\s+1d\s+with/, "$ut: UDA duration stored");
|
||||
like ($output, qr/1\s+P1D\s+with/, "$ut: UDA duration stored");
|
||||
like ($output, qr/2\s+without/, "$ut: UDA duration blank");
|
||||
|
||||
# Ensure 'extra' is stored in original form.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue