After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651113 - [libebook] querying date fields is not supported
[libebook] querying date fields is not supported
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
2.32.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2011-05-26 07:15 UTC by Christophe Dumez
Modified: 2011-09-19 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch proposal (2.75 KB, patch)
2011-05-26 07:15 UTC, Christophe Dumez
committed Details | Review

Description Christophe Dumez 2011-05-26 07:15:38 UTC
Created attachment 188634 [details] [review]
Patch proposal

Hi,

I'm currently working on the QtContacts backend for EDS, part of MeeGo.

I noticed that it is currently not supported to query date fields such as birthday and anniversary.

Since the date is store by EDS in YYYY-MM-DD format, string matching could be used. Queries such as (is "birth_date" "1984-10-26") would then be supported.

Please find attached a patch proposal to implement this.
Comment 1 Milan Crha 2011-05-26 09:59:07 UTC
Use "make-time" function for this kind of stuff. It's used like this:
   (make-time "%s")
where %s is usually an ISO time
Comment 2 Christophe Dumez 2011-05-26 10:53:57 UTC
I gave make-time a try but it seems it is only supported in e-cal, not in e-book. Also, because of the operators supported by EBookQuery (beginswith, endswith, contains, is), string match makes some sense. EBookQuery does not support the same date operators as e-cal (e.g. occur-in-time-range?).
Comment 3 Milan Crha 2011-05-26 11:06:21 UTC
You are right, I didn't read the code carefully enough. I'm sorry for that. 
I think your change is fine, let's commit it to master.
Comment 4 Christophe Dumez 2011-05-26 11:33:46 UTC
Would it be possible to get these patches in gnome-2-32 also? This is what is still use in MeeGo.
Comment 5 Milan Crha 2011-05-27 13:40:59 UTC
Created commit 37a3503 in eds master (3.1.2+)
Comment 6 Milan Crha 2011-09-19 09:26:34 UTC
This patch has a regression, see bug #659184