mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CmdAdd: Make sure a UUID is printed if ID does not exist
This fixes a regression was introduced in
4e80d5d5fd
.
Currently, if a user (with default configuration) adds a completed or
deleted task, they do not get a confirmation message ("Created task
..."). This is due to the fact that:
a) new-uuid is not set by default
b) new-id is set by default, but only prints message if the added task
is in pending or waiting state
Make sure to print a message containing UUID reference if the newly
added task is in completed or deleted state.
This commit is contained in:
parent
e186d375dc
commit
10b64adb58
1 changed files with 6 additions and 4 deletions
|
@ -63,13 +63,15 @@ int CmdAdd::execute (std::string& output)
|
|||
// asked for this if they just wanted a human-friendly number.
|
||||
|
||||
if (Context::getContext ().verbose ("new-uuid") &&
|
||||
status != Task::recurring)
|
||||
output += format ("Created task {1}.\n", task.get ("uuid"));
|
||||
|
||||
else if (Context::getContext ().verbose ("new-uuid") &&
|
||||
status == Task::recurring)
|
||||
output += format ("Created task {1} (recurrence template).\n", task.get ("uuid"));
|
||||
|
||||
else if (Context::getContext ().verbose ("new-uuid") ||
|
||||
(Context::getContext ().verbose ("new-id") &&
|
||||
(status == Task::completed ||
|
||||
status == Task::deleted)))
|
||||
output += format ("Created task {1}.\n", task.get ("uuid"));
|
||||
|
||||
else if (Context::getContext ().verbose ("new-id") &&
|
||||
(status == Task::pending ||
|
||||
status == Task::waiting))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue