- TW-241 new column format; recur.short.
- All duration columns now default to compact ISO duration format.
This commit is contained in:
Paul Beckingham 2014-09-06 15:38:25 -04:00
parent d33de636f1
commit 861cc83e6d
4 changed files with 19 additions and 16 deletions

View file

@ -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

View file

@ -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")
{
@ -100,21 +100,23 @@ void ColumnRecur::render (
int width,
Color& color)
{
if (_style == "default" ||
_style == "duration")
if (task.has (_name))
{
lines.push_back (
color.colorize (
rightJustify (
Duration (task.get ("recur")).formatCompact (),
width)));
}
else if (_style == "indicator")
{
if (task.has (_name))
if (_style == "default" ||
_style == "duration")
{
lines.push_back (
color.colorize (
rightJustify (
Duration (task.get ("recur")).formatISO (),
width)));
}
else if (_style == "indicator")
{
lines.push_back (
color.colorize (
rightJustify (context.config.get ("recurrence.indicator"), width)));
}
}
}

View file

@ -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")

View file

@ -55,8 +55,8 @@ 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/2\s+without/, "$ut: UDA duration blank");
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.
$output = qx{../src/task rc:$rc 1 export 2>&1};