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).
|
||||
+ Fixed bug #132, which failed to set a sort order so that active tasks sort
|
||||
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 ------------------------------
|
||||
|
||||
|
|
20
src/Att.cpp
20
src/Att.cpp
|
@ -492,8 +492,24 @@ bool Att::match (const Att& other) const
|
|||
// If there are no mods, just perform a straight compare on value.
|
||||
if (mMod == "")
|
||||
{
|
||||
if (!compare (mValue, other.mValue, (bool) case_sensitive))
|
||||
return false;
|
||||
// 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))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// has = contains as a substring.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue