From a5b57ec2ac5d77154dcbff94bbcfe133667f95fe Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 22 May 2010 13:50:20 -0400 Subject: [PATCH] Bug Fix - #395 - When a recurrence period is added to a pending task, the status should change from pending to recurring, and a mask attribute should be added. The lack of those changes meant that "task 1 recur:1w" did not do what was expected. Thanks to T. Charles Yun. --- ChangeLog | 4 +++- src/command.cpp | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0b3e2c008..4351c2ffa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,7 +20,9 @@ + Fixed bug #402 which failed compilation on Arch Linux (thanks to Johannes Schlatow). + Fixed bug #401 that ignored the search.case.sensitive configuration - setting when filtering on project names (thank to John Florian). + setting when filtering on project names (thanks to John Florian). + + Fixed bug #395 that prevented the upgrade of a pending task to a + recurring task (thanks to T. Charles Yun). ------ old releases ------------------------------ diff --git a/src/command.cpp b/src/command.cpp index 627ac1f3f..6609aac5b 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1359,6 +1359,21 @@ int handleModify (std::string &outs) // A non-zero value forces a file write. int changes = 0; + // If a task is being made recurring, there are other cascading + // changes. + if (!task->has ("recur") && + context.task.has ("recur")) + { + other->setStatus (Task::recurring); + other->set ("mask", ""); + ++changes; + + std::cout << "Task " + << other->id + << " is now a recurring task." + << std::endl; + } + // Apply other deltas. if (deltaDescription (*other)) {