mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Un-wait a waiting task when deleted
This commit is contained in:
parent
33dcea68f5
commit
6546c050c5
2 changed files with 14 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue