mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-18 15:33:08 +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"))
|
||||
task.setAsNow ("end");
|
||||
|
||||
// Un-wait the task, if waiting.
|
||||
if (task.has ("wait"))
|
||||
task.remove ("wait");
|
||||
|
||||
if (permission (question, filtered.size ()))
|
||||
{
|
||||
updateRecurrenceMask (task);
|
||||
|
|
10
test/wait.t
10
test/wait.t
|
@ -115,6 +115,16 @@ class TestFeature2322(TestCase):
|
|||
code, out, err = self.t("export")
|
||||
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__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue