TW-1583: Invalid ID displayed after done/delete
- Fix completed/deleted tasks getting an ID when GC is going to be run, previously resulting in invalid IDs being displayed in reports that show non-pending tasks. A side effect of this fix is that it is sometimes not possible to filter by ID when running a report right after calling done/delete. This problem existed before; this change makes it happen on the first report instead of the second, so it is more consistently broken. Commands that modify tasks are not affected, making this an annoying yet harmless defect.
This commit is contained in:
@@ -108,8 +108,10 @@ class TestExportCommand(TestCase):
|
||||
def test_export_end(self):
|
||||
self.t(('1', 'start'))
|
||||
self.t.faketime("+5s")
|
||||
self.t(('1', 'done'))
|
||||
self.assertTimestamp(self.export(1)['end'])
|
||||
# After a task is "done" or "deleted", it does not have an ID by which
|
||||
# to filter it anymore. Add a tag to work around this.
|
||||
self.t(('1', 'done', '+workaround'))
|
||||
self.assertTimestamp(self.export('+workaround')['end'])
|
||||
|
||||
def test_export_due(self):
|
||||
self.t(('1', 'modify', 'due:today'))
|
||||
|
||||
Reference in New Issue
Block a user