From 22228547caa1a8b721a96d2d4d6beb7244890859 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 24 Jan 2021 04:12:13 -0500 Subject: [PATCH] CmdCalendar: Consider waiting status equivalent to pending for purposes of display The purpose of displaying due dates on the calendar is to convey the relative business of any given day. Waiting status signifies a task should not be displayed in reports yet, but for the purposes of planning, it should be displayed in the calendar overview. Closes #2393. --- src/commands/CmdCalendar.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index 971fc4f9f..1481e999a 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -175,7 +175,8 @@ int CmdCalendar::execute (std::string& output) Datetime oldest (2037, 12, 31); for (auto& task : tasks) { - if (task.getStatus () == Task::pending) + auto status = task.getStatus (); + if (status == Task::pending || status == Task::waiting) { if (task.has ("due") && !task.hasTag ("nocal")) @@ -562,8 +563,10 @@ std::string CmdCalendar::renderMonths ( Context::getContext ().config.set ("due", 0); for (auto& task : all) { - if (task.getStatus () == Task::pending && - !task.hasTag ("nocal") && + auto status = task.getStatus (); + if ((status == Task::pending || + status == Task::waiting ) && + !task.hasTag ("nocal") && task.has ("due")) { std::string due = task.get ("due");