/////////////////////////////////////////////////////////////////////////// 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.
| 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. |
| 513 | bool 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. |