- Fixed problem where 'project' was not supported as a verbosity token (thanks
  to Adam Gibbins).
This commit is contained in:
Paul Beckingham 2012-03-17 10:11:55 -04:00
parent deb12102f6
commit 80d6655709
17 changed files with 35 additions and 17 deletions

View file

@ -128,4 +128,5 @@ suggestions:
Najmi Ahmad Zabidi
Philipp Woelfel
Tuomas Toivola
Adam Gibbins

View file

@ -306,6 +306,8 @@
data.
+ Fixed problem where update-holidays.pl did not use the YYYYMMDD date foramt.
+ Fixed problem where urgency was not properly calculated for waiting tasks.
+ Fixed problem where 'project' was not supported as a verbosity token (thanks
to Adam Gibbins).
------ old releases ------------------------------

View file

@ -253,6 +253,7 @@ control specific occasions when output is generated. This list may contain:
affected Reports 'N tasks affected' and similar
edit Used the verbose template for the 'edit' command
special Feedback when applying special tags
project Feedback about project status changes
Note that the "on" setting is equivalent to all the tokens being specified,
and the "off" setting is equivalent to none of the tokens being specified.

View file

@ -82,7 +82,7 @@ std::string Config::_defaults =
"#verbose=no # Provide regular feedback\n"
"#verbose=nothing # Provide no feedback\n"
"# # Comma-separated list. May contain any subset of:\n"
"#verbose=blank,header,footnote,label,new-id,affected,edit,special\n"
"#verbose=blank,header,footnote,label,new-id,affected,edit,special,project\n"
"confirmation=yes # Confirmation on delete, big changes\n"
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"
"indent.annotation=2 # Indent spaces for annotations\n"

View file

@ -452,7 +452,8 @@ bool Context::verbose (const std::string& token)
verbosity[0] != "new-id" && //
verbosity[0] != "affected" && //
verbosity[0] != "edit" && //
verbosity[0] != "special") //
verbosity[0] != "special" && //
verbosity[0] != "project") //
{
verbosity.clear ();
@ -464,6 +465,7 @@ bool Context::verbose (const std::string& token)
verbosity.push_back ("affected");
verbosity.push_back ("edit");
verbosity.push_back ("special");
verbosity.push_back ("project");
}
}

View file

@ -56,11 +56,10 @@ int CmdAdd::execute (std::string& output)
modify_task_description_replace (task, context.a3.extract_modifications ());
context.tdb2.add (task);
// TODO This should be a call in to feedback.cpp.
if (context.verbose ("new-id"))
output = format (STRING_CMD_ADD_FEEDBACK, context.tdb2.next_id ()) + "\n";
// TODO verbosity token.
if (context.verbose ("project"))
context.footnote (onProjectChange (task));
context.tdb2.commit ();

View file

@ -84,6 +84,7 @@ int CmdAnnotate::execute (std::string& output)
context.tdb2.modify (*task);
++count;
feedback_affected (STRING_CMD_ANNO_TASK, *task);
if (context.verbose ("project"))
context.footnote (onProjectChange (*task, true));
// Annotate siblings.

View file

@ -87,6 +87,7 @@ int CmdAppend::execute (std::string& output)
context.tdb2.modify (*task);
++count;
feedback_affected (STRING_CMD_APPEND_TASK, *task);
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (*task, true);
// Append to siblings.

View file

@ -102,6 +102,7 @@ int CmdDelete::execute (std::string& output)
feedback_affected (STRING_CMD_DELETE_TASK, *task);
feedback_unblocked (*task);
dependencyChainOnComplete (*task);
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (*task, true);
// Delete siblings.

View file

@ -103,6 +103,7 @@ int CmdDone::execute (std::string& output)
if (!nagged)
nagged = nag (*task);
dependencyChainOnComplete (*task);
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (*task, false);
}
else

View file

@ -117,6 +117,7 @@ int CmdDuplicate::execute (std::string& output)
if (context.verbose ("new-id"))
std::cout << format (STRING_CMD_ADD_FEEDBACK, context.tdb2.next_id ()) + "\n";
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (*task, false);
}
else

View file

@ -65,6 +65,7 @@ int CmdLog::execute (std::string& output)
throw std::string (STRING_CMD_LOG_NO_WAITING);
context.tdb2.add (task);
if (context.verbose ("project"))
context.footnote (onProjectChange (task));
context.tdb2.commit ();

View file

@ -112,6 +112,7 @@ int CmdModify::execute (std::string& output)
feedback_affected (STRING_CMD_MODIFY_TASK, *task);
feedback_unblocked (*task);
context.tdb2.modify (*task);
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (before, *task);
// Task potentially has siblings - modify them.
@ -132,6 +133,7 @@ int CmdModify::execute (std::string& output)
feedback_affected (STRING_CMD_MODIFY_TASK_R, *sibling);
feedback_unblocked (*sibling);
context.tdb2.modify (*sibling);
if (context.verbose ("project"))
projectChanges[sibling->get ("project")] = onProjectChange (alternate, *sibling);
}
}
@ -152,6 +154,7 @@ int CmdModify::execute (std::string& output)
updateRecurrenceMask (*child);
context.tdb2.modify (*child);
dependencyChainOnModify (alternate, *child);
if (context.verbose ("project"))
projectChanges[child->get ("project")] = onProjectChange (alternate, *child);
++count;
feedback_affected (STRING_CMD_MODIFY_TASK_R, *child);

View file

@ -87,6 +87,7 @@ int CmdPrepend::execute (std::string& output)
context.tdb2.modify (*task);
++count;
feedback_affected (STRING_CMD_PREPEND_TASK, *task);
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (*task, true);
// Prepend to siblings.

View file

@ -96,6 +96,7 @@ int CmdStart::execute (std::string& output)
if (!nagged)
nagged = nag (*task);
dependencyChainOnStart (*task);
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (*task, false);
}
else

View file

@ -92,6 +92,7 @@ int CmdStop::execute (std::string& output)
++count;
feedback_affected (STRING_CMD_STOP_TASK, *task);
dependencyChainOnStart (*task);
if (context.verbose ("project"))
projectChanges[task->get ("project")] = onProjectChange (*task, false);
}
else

View file

@ -63,6 +63,7 @@ unlike ($output, qr/ID.+Project.+Pri.+Description/, '\'label\' verbosity good');
# TODO Verbosity: 'header'
# TODO Verbosity: 'edit'
# TODO Verbosity: 'special'
# TODO Verbosity: 'project'
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key verbose.rc);