Un-wait a waiting task when deleted
This commit is contained in:
committed by
Tomas Babej
parent
33dcea68f5
commit
6546c050c5
@@ -89,6 +89,10 @@ int CmdDelete::execute (std::string&)
|
|||||||
if (! task.has ("end"))
|
if (! task.has ("end"))
|
||||||
task.setAsNow ("end");
|
task.setAsNow ("end");
|
||||||
|
|
||||||
|
// Un-wait the task, if waiting.
|
||||||
|
if (task.has ("wait"))
|
||||||
|
task.remove ("wait");
|
||||||
|
|
||||||
if (permission (question, filtered.size ()))
|
if (permission (question, filtered.size ()))
|
||||||
{
|
{
|
||||||
updateRecurrenceMask (task);
|
updateRecurrenceMask (task);
|
||||||
|
|||||||
10
test/wait.t
10
test/wait.t
@@ -115,6 +115,16 @@ class TestFeature2322(TestCase):
|
|||||||
code, out, err = self.t("export")
|
code, out, err = self.t("export")
|
||||||
self.assertNotIn('"wait":', out)
|
self.assertNotIn('"wait":', out)
|
||||||
|
|
||||||
|
def test_delete_unwait(self):
|
||||||
|
"""2322: Deleteion should un-wait a waiting task"""
|
||||||
|
self.t("add bar wait:tomorrow")
|
||||||
|
code, out, err = self.t("export")
|
||||||
|
self.assertIn('"wait":', out)
|
||||||
|
|
||||||
|
self.t("1 delete", input="y\n")
|
||||||
|
code, out, err = self.t("export")
|
||||||
|
self.assertNotIn('"wait":', out)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from simpletap import TAPTestRunner
|
from simpletap import TAPTestRunner
|
||||||
|
|||||||
Reference in New Issue
Block a user