Bug #1268
- #1268 Edit doesn't accept changes, if task has completed dependency (thanks to Dmitriy Matrosov, Michele Santullo).
This commit is contained in:
2
AUTHORS
2
AUTHORS
@@ -183,3 +183,5 @@ suggestions:
|
|||||||
Ben Armstrong
|
Ben Armstrong
|
||||||
XTaran
|
XTaran
|
||||||
John West
|
John West
|
||||||
|
Dmitriy Matrosov
|
||||||
|
Michele Santullo
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ Bugs
|
|||||||
Wilk).
|
Wilk).
|
||||||
+ #1263 The 'waiting' report properly lists only pending tasks with a wait date
|
+ #1263 The 'waiting' report properly lists only pending tasks with a wait date
|
||||||
(thanks to Fidel Mato).
|
(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.
|
+ #1270 The 'undo' command is now properly removing backlog entries.
|
||||||
+ #1273 Query with negative relative date differs greatly from absolute date
|
+ #1273 Query with negative relative date differs greatly from absolute date
|
||||||
in past (thanks to John West).
|
in past (thanks to John West).
|
||||||
|
|||||||
@@ -990,11 +990,6 @@ void Task::addDependency (const std::string& uuid)
|
|||||||
if (uuid == get ("uuid"))
|
if (uuid == get ("uuid"))
|
||||||
throw std::string (STRING_TASK_DEPEND_ITSELF);
|
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.
|
// Store the dependency.
|
||||||
std::string depends = get ("depends");
|
std::string depends = get ("depends");
|
||||||
if (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;
|
std::vector <std::string>::iterator dep;
|
||||||
for (dep = dependencies.begin (); dep != dependencies.end (); ++dep)
|
for (dep = dependencies.begin (); dep != dependencies.end (); ++dep)
|
||||||
{
|
{
|
||||||
std::vector <int> ids;
|
if (dep->length () >= 7)
|
||||||
|
task.addDependency (*dep);
|
||||||
// Crude UUID check
|
|
||||||
if (dep->length () == 36)
|
|
||||||
{
|
|
||||||
int id = context.tdb2.pending.id (*dep);
|
|
||||||
ids.push_back (id);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
A3::extract_id (*dep, ids);
|
task.addDependency ((int) strtol (dep->c_str (), NULL, 10));
|
||||||
|
|
||||||
std::vector <int>::iterator id;
|
|
||||||
for (id = ids.begin (); id != ids.end(); id++)
|
|
||||||
task.addDependency (*id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UDAs
|
// UDAs
|
||||||
|
|||||||
Reference in New Issue
Block a user