mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-27 21:23:25 +02:00
TW-1704: Task: Use Task::identifier to reference the task
To achieve consistent output, use a helper method to generate a proper handle - ID for tasks with non-zero ID, UUID otherwise.
This commit is contained in:
parent
1236abc7d5
commit
2d25cf6f59
16 changed files with 50 additions and 57 deletions
|
@ -70,19 +70,10 @@ int CmdUrgency::execute (std::string& output)
|
|||
std::stringstream out;
|
||||
for (auto& task : filtered)
|
||||
{
|
||||
if (task.id)
|
||||
{
|
||||
out << format (STRING_CMD_URGENCY_RESULT,
|
||||
task.id, trim (format (task.urgency (), 6, 3)))
|
||||
<< "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
out << format (STRING_CMD_URGENCY_RESULT,
|
||||
task.get ("uuid"),
|
||||
trim (format (task.urgency (), 6, 3)))
|
||||
<< "\n";
|
||||
}
|
||||
out << format (STRING_CMD_URGENCY_RESULT,
|
||||
task.identifier (),
|
||||
trim (format (task.urgency (), 6, 3)))
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
output = out.str ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue