From 0962b669286e928628e3dc01029e855fe656d665 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Sun, 24 Jul 2011 21:43:18 -0400 Subject: [PATCH] Bug #803 - Here's a patch to make Taskwarrior not display the prompt and not delete the parent task if a recurring task is deleted when rc.confirmation is false. Signed-off-by: Paul Beckingham --- AUTHORS | 1 + ChangeLog | 2 ++ src/commands/CmdDelete.cpp | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index a115ee14d..35bd604ca 100644 --- a/AUTHORS +++ b/AUTHORS @@ -54,6 +54,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Ben Boeckel Bryce Harrington Brendan O'Flaherty + Matt Kraai Thanks to the following, who submitted detailed bug reports and excellent suggestions: diff --git a/ChangeLog b/ChangeLog index 0af2007f3..1564858bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -154,6 +154,8 @@ Ben Boeckel). + Applied documentation patch for #799, fixing a broken link in the man page (thanks to Bryce Harrington). + + Applied patch for #803, allowing rc.confirmation to bypass confirmation of + the deletion of a recurring task (thanks to Matt Kraai). # Untracked Bugs, biggest first. + Fixed bug that required the '%YAML' prologue in a YAML import. diff --git a/src/commands/CmdDelete.cpp b/src/commands/CmdDelete.cpp index dcae03c30..183b5fe2f 100644 --- a/src/commands/CmdDelete.cpp +++ b/src/commands/CmdDelete.cpp @@ -92,7 +92,8 @@ int CmdDelete::execute (std::string& output) std::string parent = task->get ("parent"); if (parent != "") { - if (confirm (STRING_CMD_DELETE_CONF_RECUR)) + if (context.config.getBoolean ("confirmation") && + confirm (STRING_CMD_DELETE_CONF_RECUR)) { // Scan all pending tasks for siblings of this task, and the parent // itself, and delete them.