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 650950 - libedata-book: entry_compare should iterate over attributes with the same name
libedata-book: entry_compare should iterate over attributes with the same name
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-24 10:39 UTC by Christophe Dumez
Modified: 2011-05-27 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.04 KB, patch)
2011-05-24 10:39 UTC, Christophe Dumez
committed Details | Review

Description Christophe Dumez 2011-05-24 10:39:41 UTC
Created attachment 188446 [details] [review]
Proposed patch

Hi,

I am working on the QtContacts backend for EDS, part of MeeGo.
While testing our backend, I noticed the following problem:

I have a vCard with several X-HOBBY attributes/lines. I would like to make a query to check if any of its hobbies is "Fishing". However, it is only possible query the first X-HOBBY currently.

This is due to the fact that entry_compare() in e-book-backend-sexp.c calls e_vcard_get_attribute() which returns only one (the first) attribute with a given name.

Please find attached a patch to extend entry_compare() to iterate over attributes that have the same name (e.g. X-HOBBY) so that it can match any of them, not just the first one in the vCard.
Comment 1 Milan Crha 2011-05-24 10:53:05 UTC
Looks good. Feel free to commit to gnome-3-0 and master branches.
Comment 2 Milan Crha 2011-05-27 13:28:25 UTC
Created commit 16ebd8f in eds master (3.1.2+)