Task: Make COMPLETED and DELETED virtual tags use getStatus()

This is now consistent with how PENDING is defined since recent commit
520d7e979b.
This commit is contained in:
Tomas Babej 2021-08-08 12:00:21 -04:00
parent 91517151ad
commit f8ca8cff81

View file

@ -1346,8 +1346,8 @@ bool Task::hasTag (const std::string& tag) const
if (tag == "TEMPLATE") return has ("last") || has ("mask"); if (tag == "TEMPLATE") return has ("last") || has ("mask");
if (tag == "WAITING") return is_waiting (); if (tag == "WAITING") return is_waiting ();
if (tag == "PENDING") return getStatus () == Task::pending; if (tag == "PENDING") return getStatus () == Task::pending;
if (tag == "COMPLETED") return get ("status") == "completed"; if (tag == "COMPLETED") return getStatus () == Task::completed;
if (tag == "DELETED") return get ("status") == "deleted"; if (tag == "DELETED") return getStatus () == Task::deleted;
#ifdef PRODUCT_TASKWARRIOR #ifdef PRODUCT_TASKWARRIOR
if (tag == "UDA") return is_udaPresent (); if (tag == "UDA") return is_udaPresent ();
if (tag == "ORPHAN") return is_orphanPresent (); if (tag == "ORPHAN") return is_orphanPresent ();