mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #1268
- #1268 Edit doesn't accept changes, if task has completed dependency (thanks to Dmitriy Matrosov, Michele Santullo).
This commit is contained in:
parent
bc3bae9fd2
commit
1872a87838
4 changed files with 7 additions and 18 deletions
2
AUTHORS
2
AUTHORS
|
@ -183,3 +183,5 @@ suggestions:
|
|||
Ben Armstrong
|
||||
XTaran
|
||||
John West
|
||||
Dmitriy Matrosov
|
||||
Michele Santullo
|
||||
|
|
|
@ -67,6 +67,8 @@ Bugs
|
|||
Wilk).
|
||||
+ #1263 The 'waiting' report properly lists only pending tasks with a wait date
|
||||
(thanks to Fidel Mato).
|
||||
+ #1268 Edit doesn't accept changes, if task has completed dependency (thanks
|
||||
to Dmitriy Matrosov, Michele Santullo).
|
||||
+ #1270 The 'undo' command is now properly removing backlog entries.
|
||||
+ #1273 Query with negative relative date differs greatly from absolute date
|
||||
in past (thanks to John West).
|
||||
|
|
|
@ -990,11 +990,6 @@ void Task::addDependency (const std::string& uuid)
|
|||
if (uuid == get ("uuid"))
|
||||
throw std::string (STRING_TASK_DEPEND_ITSELF);
|
||||
|
||||
// Check that uuid is resolvable.
|
||||
int id = context.tdb2.pending.id (uuid);
|
||||
if (id == 0)
|
||||
throw format (STRING_TASK_DEPEND_MISS_CREA, id);
|
||||
|
||||
// Store the dependency.
|
||||
std::string depends = get ("depends");
|
||||
if (depends != "")
|
||||
|
|
|
@ -660,20 +660,10 @@ void CmdEdit::parseTask (Task& task, const std::string& after, const std::string
|
|||
std::vector <std::string>::iterator dep;
|
||||
for (dep = dependencies.begin (); dep != dependencies.end (); ++dep)
|
||||
{
|
||||
std::vector <int> ids;
|
||||
|
||||
// Crude UUID check
|
||||
if (dep->length () == 36)
|
||||
{
|
||||
int id = context.tdb2.pending.id (*dep);
|
||||
ids.push_back (id);
|
||||
}
|
||||
if (dep->length () >= 7)
|
||||
task.addDependency (*dep);
|
||||
else
|
||||
A3::extract_id (*dep, ids);
|
||||
|
||||
std::vector <int>::iterator id;
|
||||
for (id = ids.begin (); id != ids.end(); id++)
|
||||
task.addDependency (*id);
|
||||
task.addDependency ((int) strtol (dep->c_str (), NULL, 10));
|
||||
}
|
||||
|
||||
// UDAs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue