mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
feedback: Use task identifiers instead of IDs
During construction of a feedback string for a dependency change, a list of IDs of the dependencies was used. However, if the tasks being referred to are already deleted / completed, their respective IDs are all 0s. Use shortened UUIDs in such case.
This commit is contained in:
parent
1ebc8034b4
commit
084383a644
3 changed files with 45 additions and 22 deletions
16
src/Task.cpp
16
src/Task.cpp
|
@ -1177,6 +1177,22 @@ void Task::getDependencies (std::vector <std::string>& all) const
|
|||
all.clear ();
|
||||
split (all, get ("depends"), ',');
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Task::getDependencies (std::vector <Task>& all) const
|
||||
{
|
||||
std::vector <std::string> deps;
|
||||
split (deps, get ("depends"), ',');
|
||||
|
||||
all.clear ();
|
||||
|
||||
for (auto& dep : deps)
|
||||
{
|
||||
Task task;
|
||||
context.tdb2.get (dep, task);
|
||||
all.push_back (task);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue