diff --git a/ChangeLog b/ChangeLog index ff3ecc75b..2348bcb85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,7 @@ - TW-1729 zsh completion: zregexparse:4: not enough regex argument (thanks to Daniel Shahaf). - TW-1733 taskwarrior 2.5.0 can not compile FreeBSD 10.1 (thanks to ribbon). +- TW-1734 calendar gives an error when context is set (thanks to Simon Michael). - TW-1735 context with no subcommand should do something (thanks to Simon Michael). - TW-1736 Error on detection of BOM in files. diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index 6fc62056b..8a3c6cae5 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -49,7 +49,7 @@ CmdCalendar::CmdCalendar () _read_only = true; _displays_id = true; _needs_gc = true; - _uses_context = true; + _uses_context = false; _accepts_filter = false; _accepts_modifications = false; _accepts_miscellaneous = true; diff --git a/test/context.t b/test/context.t index 276e9feda..5380a1aa4 100755 --- a/test/context.t +++ b/test/context.t @@ -534,6 +534,17 @@ class ContextErrorHandling(TestCase): code, out, err = self.t("context show") self.assertIn("No context is currently applied.", out) +class TestBug1734(TestCase): + def setUp(self): + self.t = Task() + self.t("add zero") + self.t("add one +tag") + self.t("context define foo +tag", input="y\n") + + def test_calendar(self): + """The 'calendar' command should not fail when a context is active""" + code, out, err = self.t("calendar") + # TODO Prove context does not interfere with export # TODO Prove context does not interfere with undo