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 654454 - Please fetch resources, contacts and distribution list
Please fetch resources, contacts and distribution list
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Contacts (Global Address List)
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-07-12 11:09 UTC by Akhil Laddha
Modified: 2013-05-22 12:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add EVC_X_EWS_KIND attribute (1.13 KB, patch)
2013-05-16 13:21 UTC, Fabiano Fidêncio
rejected Details | Review
Use EVC_X_EWS_KIND attribute (7.19 KB, patch)
2013-05-16 13:22 UTC, Fabiano Fidêncio
reviewed Details | Review
Use "X-EWS-KIND" attribute (11.11 KB, patch)
2013-05-22 02:39 UTC, Fabiano Fidêncio
committed Details | Review

Description Akhil Laddha 2011-07-12 11:09:19 UTC
EWS + Exchange 2010

Currently OAB fetches only user mailboxes. It should fetch resources, general contacts and distribution lists.

When i compose a message in Outlook and click on To, it shows a complete address book list which consists of

1) All Contacts
2) All Rooms
3) All Users
4) All Groups
5) Public Folders

We may need something similar.
Comment 1 Chenthill P 2011-07-18 13:03:38 UTC
Hmm. Not sure how i can get this done. At-least we show what is available through Exchange web services..
Comment 2 Milan Crha 2013-05-15 08:38:01 UTC
OK, I understand this as being about Offline Address Book parsing.

(In reply to comment #0)
> 1) All Contacts
> 2) All Rooms

evolution doesn't differentiate resource and contact, thus it'll be shown as a regular person. The vCard 4.0 defines KIND, which is designed for this - eds may update to vCard 4.0 eventually (one day, not part of this bug report).

> 3) All Users
> 4) All Groups

aka distribution lists, in EWS' terminology, and contact lists, in evo's terminology.

> 5) Public Folders

These are not part of GAL, I guess it's a typo. Let's skip Public Folders here, they were taken care of in bug #656377 already.
Comment 3 Fabiano Fidêncio 2013-05-16 13:21:10 UTC
I'm going to close this bug as obsolete, since we are properly supporting from 1 to 4 in the OAB.
However, I would like to ask a review in 2 small patches that are just introducing a similar KIND's attribute for vCard 3.0.
Comment 4 Fabiano Fidêncio 2013-05-16 13:21:41 UTC
Created attachment 244403 [details] [review]
Add EVC_X_EWS_KIND attribute

Defines, for vCard 3.0, a similar KIND attribute
(http://tools.ietf.org/html/rfc6350#section-6.1.4), which is only
supported on vCard 4.0+, to be used on Evolution EWS.
Comment 5 Fabiano Fidêncio 2013-05-16 13:22:07 UTC
Created attachment 244404 [details] [review]
Use EVC_X_EWS_KIND attribute

For now it's only an internal hidden information, to tell us what the
contact is from the server's point of view, until there is a vCard 4.0
implemented.
Comment 6 Milan Crha 2013-05-16 14:48:04 UTC
Review of attachment 244403 [details] [review]:

As long as it serves to EWS only, you should define it in EWS, not in eds. You changed only one file in the second patch, thus add it to the same file. I would name the define as X_EWS_KIND, to not confuse with other vCard defines. A similar notation is used in CalDAV too.
Comment 7 Milan Crha 2013-05-16 14:59:26 UTC
Review of attachment 244404 [details] [review]:

I see that you only write to the newly added attribute, which is fine, but I would expect you to use also other types, like "room", because you can test whether the EContact represents an individual or group by E_CONTACT_IS_LIST value, thus using only those two values for the kind is redundant. If you make it for the 'room' too, then read on write, thus you'll not change the contact type from 'room' to individual, then it may do it (not that OWA allows you to create a room, but maybe Outlook does (I'll check it out)).

::: src/addressbook/e-book-backend-ews.c
@@ +2545,3 @@
 	g_return_if_fail (priv->summary != NULL);
 
+	for (l = new_items; l != NULL; l = l->next) {

technically speaking, using g_slist_next() is safer, it adds some checking on the argument.
Comment 8 Fabiano Fidêncio 2013-05-22 02:39:10 UTC
Created attachment 245016 [details] [review]
Use "X-EWS-KIND" attribute

For now it's only an internal hidden information, to tell us what the
contact is from the server's point of view, until there is a vCard 4.0
implemented.

Note: at least for now, is only possible to create DT_MAILUSER and
DT_DISTLIST using Evolution EWS.
Comment 9 Milan Crha 2013-05-22 06:18:19 UTC
Review of attachment 245016 [details] [review]:

Not tested, but looks fine after a read-review. Feel free to commit to master. Thanks.

::: src/addressbook/ews-oab-decoder.c
@@ +837,3 @@
+
+	if (display_type == NULL)
+		e_vcard_attribute_free (attr);

what about creating the 'attr' only if it'll be needed? I guess this free should not happen that often, but in general it might make sense to create only on demand, not always create and free occasionally (especially in such simple function like this one).
Comment 10 Fabiano Fidêncio 2013-05-22 12:22:48 UTC
Pushed in master (3.9.2+) with the suggested changes.
https://git.gnome.org/browse/evolution-ews/commit/?id=13ca0c376e5811cfb93968f8f494cc318a96f1a7