mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-03 18:08:34 +02:00
Bug Fix
- Fixed bug whereby if no columns labels were specified, it was considered a column count mismatch. - Fixed unit tests to use m/d/Y not M/D/Y dateformat.
This commit is contained in:
parent
2700713c03
commit
8ab3c1cc3c
2 changed files with 8 additions and 6 deletions
|
@ -2044,11 +2044,12 @@ std::string handleCustomReport (
|
|||
std::vector <std::string> labels;
|
||||
split (labels, labelList, ',');
|
||||
|
||||
if (columns.size () != labels.size ())
|
||||
if (columns.size () != labels.size () && labels.size () != 0)
|
||||
throw std::string ("There are a different number of columns than labels ") +
|
||||
"for report '" + report + "'. Please correct this.";
|
||||
|
||||
std::map <std::string, std::string> columnLabels;
|
||||
if (labels.size ())
|
||||
for (unsigned int i = 0; i < columns.size (); ++i)
|
||||
columnLabels[columns[i]] = labels[i];
|
||||
|
||||
|
|
|
@ -37,17 +37,18 @@ if (open my $fh, '>', 'due.rc')
|
|||
"due=4\n",
|
||||
"color=on\n",
|
||||
"color.due=red\n",
|
||||
"_forcecolor=on\n";
|
||||
"_forcecolor=on\n",
|
||||
"dateformat=m/d/Y\n";
|
||||
close $fh;
|
||||
ok (-r 'due.rc', 'Created due.rc');
|
||||
}
|
||||
|
||||
# Add a task that is almost due, and one that is just due.
|
||||
my ($d, $m, $y) = (localtime (time + 3 * 86_400))[3..5];
|
||||
my $just = sprintf ("%d/%02d/%d", $m + 1, $d, $y + 1900);
|
||||
my $just = sprintf ("%d/%d/%d", $m + 1, $d, $y + 1900);
|
||||
|
||||
($d, $m, $y) = (localtime (time + 5 * 86_400))[3..5];
|
||||
my $almost = sprintf ("%d/%02d/%d", $m + 1, $d, $y + 1900);
|
||||
my $almost = sprintf ("%d/%d/%d", $m + 1, $d, $y + 1900);
|
||||
|
||||
qx{../task rc:due.rc add one due:$just};
|
||||
qx{../task rc:due.rc add two due:$almost};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue