TW-1, TW-1438

- TW-1 Recurring task message on the same task (thanks to Profpatsch).
This commit is contained in:
Paul Beckingham 2014-12-26 10:16:11 -05:00
parent 8795b0a692
commit 1488c1c6fa
9 changed files with 128 additions and 120 deletions

View file

@ -22,6 +22,7 @@
- #1508 Show command highlight configuration (thanks to Nicolas Appriou).
- #1511 sync init crashes if client certification file is empty or invalid
(thanks to Marton Suranyi).
- TW-1 Recurring task message on the same task (thanks to Profpatsch).
- TW-5 color.due.today does not work (thanks to Max Muller).
- TW-15 'task recurring' shows only children of recurring tasks (thanks to
Louis-Claude Canon).

2
NEWS
View file

@ -46,7 +46,7 @@ New configuration options in taskwarrior 2.4.0
- New 'urgency.uda.<name>.<value>' allows specific UDA values to affect
urgency.
- New 'recurrence.confirmation' which allows bypassing confirmation for
changes to recurring tasks, by accepting them.
changes to recurring tasks, by accepting, rejecting or prompting.
Newly deprecated features in taskwarrior 2.4.0

View file

@ -409,9 +409,11 @@ The character or string to show in the tag.indicator column. Defaults to +.
The character or string to show in the depends.indicator column. Defaults to +.
.TP
.B recurrence.confirmation=yes
.B recurrence.confirmation=prompt
Controls whether changes to recurring tasks propagates to other child tasks with
or without confirmation. Defaults to yes.
or without confirmation. A value of 'yes' means propagate changes without
confirmation. A value of 'no' means do not propagate changes and don't ask for
confirmation. A value of 'prompt' prompts you every time. Defaults to 'prompt'.
.TP
.B recurrence.indicator=R

View file

@ -82,7 +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.confirmation=yes # Confirmation for propagating changes among recurring tasks\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"
"indent.report=0 # Indent spaces for whole report\n"

View file

@ -90,8 +90,9 @@ int CmdAnnotate::execute (std::string& output)
// Annotate siblings.
if (task->has ("parent"))
{
if (! context.config.getBoolean ("recurrence.confirmation") ||
confirm (STRING_CMD_ANNO_CONFIRM_R))
if ((context.config.get ("recurrence.confirmation") == "prompt"
&& confirm (STRING_CMD_ANNO_CONFIRM_R)) ||
context.config.getBoolean ("recurrence.confirmation"))
{
std::vector <Task> siblings = context.tdb2.siblings (*task);
std::vector <Task>::iterator sibling;

View file

@ -90,8 +90,9 @@ int CmdAppend::execute (std::string& output)
// Append to siblings.
if (task->has ("parent"))
{
if (! context.config.getBoolean ("recurrence.confirmation") ||
confirm (STRING_CMD_APPEND_CONFIRM_R))
if ((context.config.get ("recurrence.confirmation") == "prompt"
&& confirm (STRING_CMD_APPEND_CONFIRM_R)) ||
context.config.getBoolean ("recurrence.confirmation"))
{
std::vector <Task> siblings = context.tdb2.siblings (*task);
std::vector <Task>::iterator sibling;

View file

@ -103,8 +103,9 @@ int CmdDelete::execute (std::string& output)
// Delete siblings.
if (task->has ("parent"))
{
if (! context.config.getBoolean ("recurrence.confirmation") ||
confirm (STRING_CMD_DELETE_CONFIRM_R))
if ((context.config.get ("recurrence.confirmation") == "prompt"
&& confirm (STRING_CMD_DELETE_CONFIRM_R)) ||
context.config.getBoolean ("recurrence.confirmation"))
{
std::vector <Task> siblings = context.tdb2.siblings (*task);
std::vector <Task>::iterator sibling;

View file

@ -117,8 +117,9 @@ int CmdModify::execute (std::string& output)
// Task potentially has siblings - modify them.
if (task->has ("parent"))
{
if (! context.config.getBoolean ("recurrence.confirmation") ||
confirm (STRING_CMD_MODIFY_RECUR))
if ((context.config.get ("recurrence.confirmation") == "prompt"
&& confirm (STRING_CMD_MODIFY_RECUR)) ||
context.config.getBoolean ("recurrence.confirmation"))
{
std::vector <Task> siblings = context.tdb2.siblings (*task);
std::vector <Task>::iterator sibling;

View file

@ -90,8 +90,9 @@ int CmdPrepend::execute (std::string& output)
// Prepend to siblings.
if (task->has ("parent"))
{
if (! context.config.getBoolean ("recurrence.confirmation") ||
confirm (STRING_CMD_PREPEND_CONFIRM_R))
if ((context.config.get ("recurrence.confirmation") == "prompt"
&& confirm (STRING_CMD_PREPEND_CONFIRM_R)) ||
context.config.getBoolean ("recurrence.confirmation"))
{
std::vector <Task> siblings = context.tdb2.siblings (*task);
std::vector <Task>::iterator sibling;