mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug #405 - after upgrade, "due:" filter not working for tasks created in version 1.9.0
- Fixed bug #405, which incorrectly compared dates on tasks created by versions earlier than 1.9.1 to those created by 1.9.1 or later (thanks to Ivo Jimenez).
This commit is contained in:
parent
688233b3a4
commit
b2eb9c3265
2 changed files with 21 additions and 2 deletions
|
@ -45,6 +45,9 @@
|
||||||
if the year was not included in the dateformat (thanks to Michelle Crane).
|
if the year was not included in the dateformat (thanks to Michelle Crane).
|
||||||
+ Fixed bug #132, which failed to set a sort order so that active tasks sort
|
+ Fixed bug #132, which failed to set a sort order so that active tasks sort
|
||||||
higher than inactive tasks, all things being equal.
|
higher than inactive tasks, all things being equal.
|
||||||
|
+ Fixed bug #405, which incorrectly compared dates on tasks created by
|
||||||
|
versions earlier than 1.9.1 to those created by 1.9.1 or later (thanks to
|
||||||
|
Ivo Jimenez).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
16
src/Att.cpp
16
src/Att.cpp
|
@ -491,10 +491,26 @@ bool Att::match (const Att& other) const
|
||||||
|
|
||||||
// If there are no mods, just perform a straight compare on value.
|
// If there are no mods, just perform a straight compare on value.
|
||||||
if (mMod == "")
|
if (mMod == "")
|
||||||
|
{
|
||||||
|
// Exact matches on dates should only compare m/d/y, not h:m:s. This allows
|
||||||
|
// Comapisons like "task list due:today" (bug #405).
|
||||||
|
std::string which = type (mName);
|
||||||
|
if (which == "date")
|
||||||
|
{
|
||||||
|
Date left (mValue);
|
||||||
|
Date right (other.mValue);
|
||||||
|
|
||||||
|
if (left.year () != right.year () ||
|
||||||
|
left.month () != right.month () ||
|
||||||
|
left.day () != right.day ())
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (!compare (mValue, other.mValue, (bool) case_sensitive))
|
if (!compare (mValue, other.mValue, (bool) case_sensitive))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// has = contains as a substring.
|
// has = contains as a substring.
|
||||||
else if (mMod == "has" || mMod == "contains") // TODO i18n
|
else if (mMod == "has" || mMod == "contains") // TODO i18n
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue