From 4bdee56fa726210ecdf2c8c25f9fd06e238d1199 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 25 Jan 2015 15:41:31 -0500 Subject: [PATCH] Configuration - New 'recurrence' configuration setting can disable recurring task generation. --- ChangeLog | 1 + NEWS | 2 ++ doc/man/taskrc.5.in | 5 +++++ src/Config.cpp | 1 + src/commands/CmdShow.cpp | 1 + src/recur.cpp | 5 +++++ 6 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 827919e80..3a2ceb6d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ - Changed assorted reports so they do not use '.age' format for dates that are in the future, because those are never shown with this format (thanks to Sujeevan Vijayakumaran). +- New 'recurrence' configuration setting can disable recurring task generation. ------ current release --------------------------- diff --git a/NEWS b/NEWS index 8f6b80846..65184d0b6 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ New configuration options in taskwarrior 2.4.1 - The 'date.iso' setting allows you to enable (default) or disable support for ISO-8601 dates. This is because some of you have 'dateformat' settings that conflict. + - The 'recurrence' setting enables (default) or disables recurring task + instance generation. Newly deprecated features in taskwarrior 2.4.1 diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index d942a7577..cb405d104 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -411,6 +411,11 @@ The character or string to show in the depends.indicator column. Defaults to +. .B uda..indicator=U The character or string to show in the .indicator column. Defaults to U. +.TP +.B recurrence=yes +Controls whether recurrence is enable, and whether recurring tasks continue to +generate new task instances. Defaults to 'yes'. + .TP .B recurrence.confirmation=prompt Controls whether changes to recurring tasks propagates to other child tasks with diff --git a/src/Config.cpp b/src/Config.cpp index 30cb95d86..4083878fc 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -82,6 +82,7 @@ std::string Config::_defaults = "# # Comma-separated list. May contain any subset of:\n" "#verbose=blank,header,footnote,label,new-id,new-uuid,affected,edit,special,project,sync,filter\n" "confirmation=yes # Confirmation on delete, big changes\n" + "recurrence=yes # Enable recurrence\n" "recurrence.confirmation=prompt # Confirmation for propagating changes among recurring tasks (yes/no/prompt)\n" "allow.empty.filter=yes # An empty filter gets a warning and requires confirmation\n" "indent.annotation=2 # Indent spaces for annotations\n" diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index 3a96b467f..38f7b9c94 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -172,6 +172,7 @@ int CmdShow::execute (std::string& output) " monthsperline" " nag" " print.empty.columns" + " recurrence" " recurrence.confirmation" " recurrence.indicator" " recurrence.limit" diff --git a/src/recur.cpp b/src/recur.cpp index 681b4dc82..e9411890d 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -54,6 +54,11 @@ extern Context context; // child tasks need to be generated to fill gaps. void handleRecurrence () { + // Recurrence can be disabled. + // Note: This is currently a workaround for TD-44, TW-1520. + if (! context.config.getBoolean ("recurrence")) + return; + std::vector tasks = context.tdb2.pending.get_tasks (); Date now;