diff --git a/AUTHORS b/AUTHORS index 1b90942b0..0f1724efb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -110,4 +110,5 @@ suggestions: Arkady Grudzinsky Bernhard B Aikido Guy + Gour D diff --git a/ChangeLog b/ChangeLog index 52afb3566..bb533fb32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -187,6 +187,9 @@ Owen Clarke). + Fixed bug #831, which prevented some date fields from being properly parsed. + Fixed bug #835, which prevented hierarchical projects from being recognized. + + Fixed bug #839, which caused problems when recurrence frequencies of '1m' + were used. This is an obsolete form, and should now be '1mo' (thanks to + Gour D). # Untracked Bugs, biggest first. + Fixed bug that required the '%YAML' prologue in a YAML import. diff --git a/src/Task.cpp b/src/Task.cpp index eb1853d4e..9083ece1d 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -309,6 +309,11 @@ void Task::parse (const std::string& input) nl.skip (':') && nl.getQuoted ('"', value)) { + // Experimental legacy value translation. + if (name == "recur" && + value == "1m") + value = "1mo"; + (*this)[name] = decode (json::decode (value)); } diff --git a/test/bug.839.t b/test/bug.839.t index 7a12e6c01..33a591808 100755 --- a/test/bug.839.t +++ b/test/bug.839.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -46,6 +46,7 @@ if (open my $fh, '>', 'pending.data') } my $output = qx{../src/task rc:bug.rc list}; +like ($output, qr/One/, 'task listed'); unlike ($output, qr/The recurrence value '1m' is not valid\./, 'recu:1m => no error'); # Cleanup.