[Bug 308342] New: Search by age reports wrong results
Luis Silva
lacsilva at gmail.com
Sat Oct 13 21:28:39 BST 2012
https://bugs.kde.org/show_bug.cgi?id=308342
Bug ID: 308342
Severity: normal
Version: Git (master)
Priority: NOR
Assignee: kdepim-bugs at kde.org
Summary: Search by age reports wrong results
Classification: Unclassified
OS: Linux
Reporter: lacsilva at gmail.com
Hardware: Other
Status: UNCONFIRMED
Component: general
Product: kmail2
The search by age in kmail does not and cannot work in it's current
implementation.
In kdepim/mailcommon/searchpattern.cpp, the comparison is presently made with a
QDate instead of a QDateTime. This makes the search not work at all.
Moreover, the age value is not subtracted from the present date but added. I
have a patch correcting these issues but then the comparison is inverted, an
issue I do not know how to correct. For example, searching for mail with an age
"lower or equal" than "3 days" produces the following query (today is
2012-10-13):
select distinct ?r ?reqProp1 where { { ?r
<http://akonadi-project.org/ontologies/aneo#akonadiItemId> ?reqProp1 . ?r
<http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate> ?v1 .
FILTER(?v1<="2012-10-10T23:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>)
. ?r a <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email> .
FILTER EXISTS { ?r a [
<http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible>
"true"^^<http://www.w3.org/2001/XMLSchema#boolean> ] . } . } . }
Reproducible: Always
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list