TW-1481: Unable to assign a completed task as dependency

- Thanks to Tomas Babej.
This commit is contained in:
Paul Beckingham 2015-11-17 13:56:40 -05:00
parent 253fd35dc7
commit f7d0f500fc
3 changed files with 4 additions and 5 deletions

View file

@ -9,6 +9,8 @@
- TW-1425 The 'age' format rounds in odd ways (thanks to Black Ops testing).
- TW-1446 Difference in how relative dates are specified in report filters since 2.3.0
(thanks to atomicules).
- TW-1481 Unable to assign a completed task as dependency (thanks to Tomas
Babej).
- TW-1500 Dates formatted as ".age", ".remaining", or ".countdown" often give
blank results (thanks to Jeremy John Reeder).
- TW-1582 Wrong urgency for first report after reviving task with

View file

@ -2031,14 +2031,14 @@ void Task::modify (modType type, bool text_required /* = false */)
if (dep[0] == '-')
{
if (dep.length () == 37)
removeDependency (context.tdb2.pending.id (dep.substr (1)));
removeDependency (dep.substr (1));
else
removeDependency (strtol (dep.substr (1).c_str (), NULL, 10));
}
else
{
if (dep.length () == 36)
addDependency (context.tdb2.pending.id (dep));
addDependency (dep);
else
addDependency (strtol (dep.c_str (), NULL, 10));
}

View file

@ -306,7 +306,6 @@ class Test1481(TestCase):
self.child1_uuid = self.t.export_one(2)['uuid']
self.child2_uuid = self.t.export_one(3)['uuid']
@unittest.expectedFailure
def test_set_dependency_on_first_completed_task(self):
"""1481: Sets dependency on task which has been just completed."""
self.t('2 done')
@ -317,7 +316,6 @@ class Test1481(TestCase):
# Set the dependency
self.t('1 modify depends:%s' % self.child1_uuid)
@unittest.expectedFailure
def test_set_dependency_on_second_completed_task(self):
"""
1481: Sets dependency on task which has been completed
@ -333,7 +331,6 @@ class Test1481(TestCase):
# Set the dependencies
self.t('1 modify depends:%s' % self.child2_uuid)
@unittest.expectedFailure
def test_set_dependency_on_two_completed_tasks(self):
""" 1481: Sets dependency on two most recent completed tasks. """
self.t('2 done')