mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
Feature TW-197
- TW-197 New virtual tag READY.
This commit is contained in:
parent
b9c853fece
commit
5ca55e75cf
5 changed files with 16 additions and 1 deletions
|
@ -5,6 +5,7 @@ Features
|
||||||
+ #1492 task show to display default values when appropriate (thanks to Renato
|
+ #1492 task show to display default values when appropriate (thanks to Renato
|
||||||
Alves).
|
Alves).
|
||||||
+ #1501 info report streamlining - partially implemented.
|
+ #1501 info report streamlining - partially implemented.
|
||||||
|
+ TW-197 New virtual tag READY.
|
||||||
+ TW-255 'Mask' instead of 'iMask' shown in info report (thanks to Benjamin
|
+ TW-255 'Mask' instead of 'iMask' shown in info report (thanks to Benjamin
|
||||||
Weber)
|
Weber)
|
||||||
+ TW-261 Easy to create "not deletable" task (thanks to Jan Kunder).
|
+ TW-261 Easy to create "not deletable" task (thanks to Jan Kunder).
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -5,7 +5,7 @@ New Features in taskwarrior 2.4.0
|
||||||
- Removed deprecated commands 'push', 'pull' and 'merge'.
|
- Removed deprecated commands 'push', 'pull' and 'merge'.
|
||||||
- Portuguese (por-PRT) localization.
|
- Portuguese (por-PRT) localization.
|
||||||
- Better handling for deletion of recurring tasks.
|
- Better handling for deletion of recurring tasks.
|
||||||
- New virtual tags: YESTERDAY, TOMORROW.
|
- New virtual tags: YESTERDAY, TOMORROW, READY.
|
||||||
|
|
||||||
New commands in taskwarrior 2.4.0
|
New commands in taskwarrior 2.4.0
|
||||||
|
|
||||||
|
|
|
@ -582,6 +582,7 @@ are:
|
||||||
OVERDUE Matches if the task is overdue
|
OVERDUE Matches if the task is overdue
|
||||||
ACTIVE Matches if the task is started
|
ACTIVE Matches if the task is started
|
||||||
SCHEDULED Matches if the task is scheduled
|
SCHEDULED Matches if the task is scheduled
|
||||||
|
READY Matches if the task is actionable
|
||||||
PARENT Matches if the task is a parent
|
PARENT Matches if the task is a parent
|
||||||
CHILD Matches if the task has a parent
|
CHILD Matches if the task has a parent
|
||||||
UNTIL Matches if the task expires
|
UNTIL Matches if the task expires
|
||||||
|
|
12
src/Task.cpp
12
src/Task.cpp
|
@ -324,6 +324,17 @@ void Task::setStatus (Task::status status)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PRODUCT_TASKWARRIOR
|
#ifdef PRODUCT_TASKWARRIOR
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Ready means pending, not blocked and either not scheduled or scheduled before
|
||||||
|
// now.
|
||||||
|
bool Task::is_ready () const
|
||||||
|
{
|
||||||
|
return getStatus () == Task::pending &&
|
||||||
|
!is_blocked &&
|
||||||
|
(! has ("scheduled") ||
|
||||||
|
Date ("now").operator> (get_date ("scheduled")));
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Task::is_due () const
|
bool Task::is_due () const
|
||||||
{
|
{
|
||||||
|
@ -1114,6 +1125,7 @@ bool Task::hasTag (const std::string& tag) const
|
||||||
if (tag == "UNBLOCKED") return !is_blocked;
|
if (tag == "UNBLOCKED") return !is_blocked;
|
||||||
if (tag == "BLOCKING") return is_blocking;
|
if (tag == "BLOCKING") return is_blocking;
|
||||||
#ifdef PRODUCT_TASKWARRIOR
|
#ifdef PRODUCT_TASKWARRIOR
|
||||||
|
if (tag == "READY") return is_ready ();
|
||||||
if (tag == "DUE") return is_due ();
|
if (tag == "DUE") return is_due ();
|
||||||
if (tag == "DUETODAY") return is_duetoday ();
|
if (tag == "DUETODAY") return is_duetoday ();
|
||||||
if (tag == "TODAY") return is_duetoday ();
|
if (tag == "TODAY") return is_duetoday ();
|
||||||
|
|
|
@ -103,6 +103,7 @@ public:
|
||||||
void remove (const std::string&);
|
void remove (const std::string&);
|
||||||
|
|
||||||
#ifdef PRODUCT_TASKWARRIOR
|
#ifdef PRODUCT_TASKWARRIOR
|
||||||
|
bool is_ready () const;
|
||||||
bool is_due () const;
|
bool is_due () const;
|
||||||
bool is_dueyesterday () const;
|
bool is_dueyesterday () const;
|
||||||
bool is_duetoday () const;
|
bool is_duetoday () const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue