2010-07-22 12:06:11

by Radoslaw Jablonski

[permalink] [raw]
Subject: [PATCH] Fix query for VCARD listing (work phone issue)

Fixed tracker query for VCARD listing - previously contacts with only
work phone filled were missing in query result (and in vcard listing).
Now if mobile/home phone number is not available, then trying to get
work phone number.
---
plugins/phonebook-tracker.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index ee072d3..41d7fde 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -72,6 +72,10 @@
"WHERE { " \
"?c a nco:PersonContact . " \
"OPTIONAL { ?c nco:hasPhoneNumber ?h . } " \
+ "OPTIONAL { " \
+ "?c nco:hasAffiliation ?a . " \
+ "?a nco:hasPhoneNumber ?h . " \
+ "} " \
"}"

#define MISSED_CALLS_QUERY \
--
1.7.0.4



2010-07-22 12:14:42

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Fix query for VCARD listing (work phone issue)

Hi Radek,

On Thu, Jul 22, 2010, Radoslaw Jablonski wrote:
> Fixed tracker query for VCARD listing - previously contacts with only
> work phone filled were missing in query result (and in vcard listing).
> Now if mobile/home phone number is not available, then trying to get
> work phone number.
> ---
> plugins/phonebook-tracker.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
> index ee072d3..41d7fde 100644
> --- a/plugins/phonebook-tracker.c
> +++ b/plugins/phonebook-tracker.c
> @@ -72,6 +72,10 @@
> "WHERE { " \
> "?c a nco:PersonContact . " \
> "OPTIONAL { ?c nco:hasPhoneNumber ?h . } " \
> + "OPTIONAL { " \
> + "?c nco:hasAffiliation ?a . " \
> + "?a nco:hasPhoneNumber ?h . " \
> + "} " \
> "}"
>
> #define MISSED_CALLS_QUERY \

Thanks for the patch. It's now upstream.

Johan