MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / is_waiting

Method is_waiting

src/Task.cpp:513–521  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Task is considered waiting if it's pending and the wait attribute is set as future datetime value. While this is not consistent with other attribute-based virtual tags, such as +BLOCKED, it is more backwards compatible with how +WAITING virtual tag behaved in the past, when waiting had a dedicated status value.

Source from the content-addressed store, hash-verified

511// as +BLOCKED, it is more backwards compatible with how +WAITING virtual tag
512// behaved in the past, when waiting had a dedicated status value.
513bool Task::is_waiting() const {
514 if (has("wait") && get("status") == "pending") {
515 Datetime now;
516 Datetime wait(get_date("wait"));
517 if (wait > now) return true;
518 }
519
520 return false;
521}
522
523////////////////////////////////////////////////////////////////////////////////
524// Try a JSON parse.

Callers

nothing calls this directly

Calls 1

getFunction · 0.70

Tested by

no test coverage detected