mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug
- Fixed problem where 'project' was not supported as a verbosity token (thanks to Adam Gibbins).
This commit is contained in:
parent
deb12102f6
commit
80d6655709
17 changed files with 35 additions and 17 deletions
1
AUTHORS
1
AUTHORS
|
@ -128,4 +128,5 @@ suggestions:
|
||||||
Najmi Ahmad Zabidi
|
Najmi Ahmad Zabidi
|
||||||
Philipp Woelfel
|
Philipp Woelfel
|
||||||
Tuomas Toivola
|
Tuomas Toivola
|
||||||
|
Adam Gibbins
|
||||||
|
|
||||||
|
|
|
@ -306,6 +306,8 @@
|
||||||
data.
|
data.
|
||||||
+ Fixed problem where update-holidays.pl did not use the YYYYMMDD date foramt.
|
+ 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 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 ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -253,6 +253,7 @@ control specific occasions when output is generated. This list may contain:
|
||||||
affected Reports 'N tasks affected' and similar
|
affected Reports 'N tasks affected' and similar
|
||||||
edit Used the verbose template for the 'edit' command
|
edit Used the verbose template for the 'edit' command
|
||||||
special Feedback when applying special tags
|
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,
|
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.
|
and the "off" setting is equivalent to none of the tokens being specified.
|
||||||
|
|
|
@ -82,7 +82,7 @@ std::string Config::_defaults =
|
||||||
"#verbose=no # Provide regular feedback\n"
|
"#verbose=no # Provide regular feedback\n"
|
||||||
"#verbose=nothing # Provide no feedback\n"
|
"#verbose=nothing # Provide no feedback\n"
|
||||||
"# # Comma-separated list. May contain any subset of:\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"
|
"confirmation=yes # Confirmation on delete, big changes\n"
|
||||||
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"
|
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"
|
||||||
"indent.annotation=2 # Indent spaces for annotations\n"
|
"indent.annotation=2 # Indent spaces for annotations\n"
|
||||||
|
|
|
@ -452,7 +452,8 @@ bool Context::verbose (const std::string& token)
|
||||||
verbosity[0] != "new-id" && //
|
verbosity[0] != "new-id" && //
|
||||||
verbosity[0] != "affected" && //
|
verbosity[0] != "affected" && //
|
||||||
verbosity[0] != "edit" && //
|
verbosity[0] != "edit" && //
|
||||||
verbosity[0] != "special") //
|
verbosity[0] != "special" && //
|
||||||
|
verbosity[0] != "project") //
|
||||||
{
|
{
|
||||||
verbosity.clear ();
|
verbosity.clear ();
|
||||||
|
|
||||||
|
@ -464,6 +465,7 @@ bool Context::verbose (const std::string& token)
|
||||||
verbosity.push_back ("affected");
|
verbosity.push_back ("affected");
|
||||||
verbosity.push_back ("edit");
|
verbosity.push_back ("edit");
|
||||||
verbosity.push_back ("special");
|
verbosity.push_back ("special");
|
||||||
|
verbosity.push_back ("project");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,12 +56,11 @@ int CmdAdd::execute (std::string& output)
|
||||||
modify_task_description_replace (task, context.a3.extract_modifications ());
|
modify_task_description_replace (task, context.a3.extract_modifications ());
|
||||||
context.tdb2.add (task);
|
context.tdb2.add (task);
|
||||||
|
|
||||||
// TODO This should be a call in to feedback.cpp.
|
|
||||||
if (context.verbose ("new-id"))
|
if (context.verbose ("new-id"))
|
||||||
output = format (STRING_CMD_ADD_FEEDBACK, context.tdb2.next_id ()) + "\n";
|
output = format (STRING_CMD_ADD_FEEDBACK, context.tdb2.next_id ()) + "\n";
|
||||||
|
|
||||||
// TODO verbosity token.
|
if (context.verbose ("project"))
|
||||||
context.footnote (onProjectChange (task));
|
context.footnote (onProjectChange (task));
|
||||||
|
|
||||||
context.tdb2.commit ();
|
context.tdb2.commit ();
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -84,7 +84,8 @@ int CmdAnnotate::execute (std::string& output)
|
||||||
context.tdb2.modify (*task);
|
context.tdb2.modify (*task);
|
||||||
++count;
|
++count;
|
||||||
feedback_affected (STRING_CMD_ANNO_TASK, *task);
|
feedback_affected (STRING_CMD_ANNO_TASK, *task);
|
||||||
context.footnote (onProjectChange (*task, true));
|
if (context.verbose ("project"))
|
||||||
|
context.footnote (onProjectChange (*task, true));
|
||||||
|
|
||||||
// Annotate siblings.
|
// Annotate siblings.
|
||||||
if (task->has ("parent"))
|
if (task->has ("parent"))
|
||||||
|
|
|
@ -87,7 +87,8 @@ int CmdAppend::execute (std::string& output)
|
||||||
context.tdb2.modify (*task);
|
context.tdb2.modify (*task);
|
||||||
++count;
|
++count;
|
||||||
feedback_affected (STRING_CMD_APPEND_TASK, *task);
|
feedback_affected (STRING_CMD_APPEND_TASK, *task);
|
||||||
projectChanges[task->get ("project")] = onProjectChange (*task, true);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (*task, true);
|
||||||
|
|
||||||
// Append to siblings.
|
// Append to siblings.
|
||||||
if (task->has ("parent"))
|
if (task->has ("parent"))
|
||||||
|
|
|
@ -102,7 +102,8 @@ int CmdDelete::execute (std::string& output)
|
||||||
feedback_affected (STRING_CMD_DELETE_TASK, *task);
|
feedback_affected (STRING_CMD_DELETE_TASK, *task);
|
||||||
feedback_unblocked (*task);
|
feedback_unblocked (*task);
|
||||||
dependencyChainOnComplete (*task);
|
dependencyChainOnComplete (*task);
|
||||||
projectChanges[task->get ("project")] = onProjectChange (*task, true);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (*task, true);
|
||||||
|
|
||||||
// Delete siblings.
|
// Delete siblings.
|
||||||
if (task->has ("parent"))
|
if (task->has ("parent"))
|
||||||
|
|
|
@ -103,7 +103,8 @@ int CmdDone::execute (std::string& output)
|
||||||
if (!nagged)
|
if (!nagged)
|
||||||
nagged = nag (*task);
|
nagged = nag (*task);
|
||||||
dependencyChainOnComplete (*task);
|
dependencyChainOnComplete (*task);
|
||||||
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -117,7 +117,8 @@ int CmdDuplicate::execute (std::string& output)
|
||||||
if (context.verbose ("new-id"))
|
if (context.verbose ("new-id"))
|
||||||
std::cout << format (STRING_CMD_ADD_FEEDBACK, context.tdb2.next_id ()) + "\n";
|
std::cout << format (STRING_CMD_ADD_FEEDBACK, context.tdb2.next_id ()) + "\n";
|
||||||
|
|
||||||
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,8 @@ int CmdLog::execute (std::string& output)
|
||||||
throw std::string (STRING_CMD_LOG_NO_WAITING);
|
throw std::string (STRING_CMD_LOG_NO_WAITING);
|
||||||
|
|
||||||
context.tdb2.add (task);
|
context.tdb2.add (task);
|
||||||
context.footnote (onProjectChange (task));
|
if (context.verbose ("project"))
|
||||||
|
context.footnote (onProjectChange (task));
|
||||||
context.tdb2.commit ();
|
context.tdb2.commit ();
|
||||||
|
|
||||||
if (context.verbose ("affected") ||
|
if (context.verbose ("affected") ||
|
||||||
|
|
|
@ -112,7 +112,8 @@ int CmdModify::execute (std::string& output)
|
||||||
feedback_affected (STRING_CMD_MODIFY_TASK, *task);
|
feedback_affected (STRING_CMD_MODIFY_TASK, *task);
|
||||||
feedback_unblocked (*task);
|
feedback_unblocked (*task);
|
||||||
context.tdb2.modify (*task);
|
context.tdb2.modify (*task);
|
||||||
projectChanges[task->get ("project")] = onProjectChange (before, *task);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (before, *task);
|
||||||
|
|
||||||
// Task potentially has siblings - modify them.
|
// Task potentially has siblings - modify them.
|
||||||
if (task->has ("parent"))
|
if (task->has ("parent"))
|
||||||
|
@ -132,7 +133,8 @@ int CmdModify::execute (std::string& output)
|
||||||
feedback_affected (STRING_CMD_MODIFY_TASK_R, *sibling);
|
feedback_affected (STRING_CMD_MODIFY_TASK_R, *sibling);
|
||||||
feedback_unblocked (*sibling);
|
feedback_unblocked (*sibling);
|
||||||
context.tdb2.modify (*sibling);
|
context.tdb2.modify (*sibling);
|
||||||
projectChanges[sibling->get ("project")] = onProjectChange (alternate, *sibling);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[sibling->get ("project")] = onProjectChange (alternate, *sibling);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,7 +154,8 @@ int CmdModify::execute (std::string& output)
|
||||||
updateRecurrenceMask (*child);
|
updateRecurrenceMask (*child);
|
||||||
context.tdb2.modify (*child);
|
context.tdb2.modify (*child);
|
||||||
dependencyChainOnModify (alternate, *child);
|
dependencyChainOnModify (alternate, *child);
|
||||||
projectChanges[child->get ("project")] = onProjectChange (alternate, *child);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[child->get ("project")] = onProjectChange (alternate, *child);
|
||||||
++count;
|
++count;
|
||||||
feedback_affected (STRING_CMD_MODIFY_TASK_R, *child);
|
feedback_affected (STRING_CMD_MODIFY_TASK_R, *child);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,8 @@ int CmdPrepend::execute (std::string& output)
|
||||||
context.tdb2.modify (*task);
|
context.tdb2.modify (*task);
|
||||||
++count;
|
++count;
|
||||||
feedback_affected (STRING_CMD_PREPEND_TASK, *task);
|
feedback_affected (STRING_CMD_PREPEND_TASK, *task);
|
||||||
projectChanges[task->get ("project")] = onProjectChange (*task, true);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (*task, true);
|
||||||
|
|
||||||
// Prepend to siblings.
|
// Prepend to siblings.
|
||||||
if (task->has ("parent"))
|
if (task->has ("parent"))
|
||||||
|
|
|
@ -96,7 +96,8 @@ int CmdStart::execute (std::string& output)
|
||||||
if (!nagged)
|
if (!nagged)
|
||||||
nagged = nag (*task);
|
nagged = nag (*task);
|
||||||
dependencyChainOnStart (*task);
|
dependencyChainOnStart (*task);
|
||||||
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,7 +92,8 @@ int CmdStop::execute (std::string& output)
|
||||||
++count;
|
++count;
|
||||||
feedback_affected (STRING_CMD_STOP_TASK, *task);
|
feedback_affected (STRING_CMD_STOP_TASK, *task);
|
||||||
dependencyChainOnStart (*task);
|
dependencyChainOnStart (*task);
|
||||||
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
if (context.verbose ("project"))
|
||||||
|
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,6 +63,7 @@ unlike ($output, qr/ID.+Project.+Pri.+Description/, '\'label\' verbosity good');
|
||||||
# TODO Verbosity: 'header'
|
# TODO Verbosity: 'header'
|
||||||
# TODO Verbosity: 'edit'
|
# TODO Verbosity: 'edit'
|
||||||
# TODO Verbosity: 'special'
|
# TODO Verbosity: 'special'
|
||||||
|
# TODO Verbosity: 'project'
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key verbose.rc);
|
unlink qw(pending.data completed.data undo.data backlog.data synch.key verbose.rc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue