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 565306 - Evolution: Add an "open contact" option when right-clicking on an email address, if they are in the address book.
Evolution: Add an "open contact" option when right-clicking on an email addre...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.22.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2008-12-22 00:39 UTC by Nick Jenkins
Modified: 2009-10-16 00:02 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
proposed evo patch (6.58 KB, patch)
2009-05-12 13:38 UTC, Milan Crha
committed Details | Review

Description Nick Jenkins 2008-12-22 00:39:09 UTC
Currently if I get an email from someone and want to call them to discuss (because it's a topic which is much more efficient to discuss on the phone), then there does not see to be an easy way to do retrieve their phone number from their contact details in Evo 2.22.

What happens (in Evolution 2.22.3.1) :
1) Open a email
2) Right-click on a From (or To, or CC) email address
3) No "open contact" option.

What would ideally happen:
1) Open a email
2) Right-click on a From (or To, or CC) email address
3) Get an "Open Contact" option (if they are in the address book), or the "Add to Address Book" (if they are not in the address book) (see bug 503008 re: changing the right-click menu depending on whether person is in the address book)
4) When select "Open Contact", open the specified contact, and show their name, email addresses, and phone numbers.
Comment 1 Milan Crha 2009-04-20 13:09:24 UTC
Though the idea is not bad, I do not like part "when in address book". That means opening all your address books, looking into each of them and checking whether it's there. Some address books are quick, some are slow. And imagine doing this all only on right-click over the email address. Every time. See bug #361145 for so many issues doing such operation only because images in HTML mails.

What do you think?
Comment 2 Nick Jenkins 2009-04-21 01:13:14 UTC
I only have local address books, which presumably are fairly quick, but I do take your point about some address books (such as centralized server-based address books for large companies, over a slow remote network) being potentially quite slow to query.

What if instead it was something like this:

1) Open a email
2) Right-click on a From (or To, or CC) email address
3) Get a new "Search for Contact..." option (on all contacts, i.e. no need to query address book at this stage). This could either replace the current "Add to Address Book..." option, or sit along side it.
4) When the user selects "Search for Contact...", a (potentially slow) query of the address book is started, and:
4a) If a contact with the same email address is found, it opens that contact.
4b) If no contact with this email address is not found it prompts and says "No matching contact was found. Add this person as a new contact? [Add as New Contact] / [Cancel]". If the user says "Add", then it does what the "Add to Address Book..." option currently does. (i.e. it prefills the email address field and name fields for a new contact)

Does that sound more feasible? This is just a rough outline, and I'm completely open to suggestions / improvements / re-workings.
Comment 3 Milan Crha 2009-04-21 08:46:47 UTC
Probably just rename the old option and have used only one, to not confuse people too much. Otherwise sounds much better than searching on right click. By the way, isn't the actual menu option doing what you want already, only the name is misleading?
Comment 4 Nick Jenkins 2009-04-22 05:25:09 UTC
> By the way, isn't the actual menu option doing what you want already, only
> the name is misleading?

Do you mean the "Add to Address Book" menu option? If so, then no. To be exact: it is doing 4b, but not 4a, and it's not doing the searching to determine whether to create a new contact or use the existing one until after the user tries to save.

For example, in Evo 2.26.0, if I right-click on my email address in a message's "To" field, then choose "Add to Address Book", then it creates a new contact, based on the name and email address the sender used, and when I click okay it says "Duplicate contact detected", and brings up a dialog box for me to resolve the conflict (either by add or merge). Instead, it would be good to right-click on an email address and show the person's existing contact details, without trying to add a duplicate contact. I.e. looking for a way to open the existing contact based on the email address, and only create a new contact if there isn't a match.
Comment 5 Milan Crha 2009-05-07 17:18:02 UTC
I just tried to play with this a bit, and I realized that there is some way of doing what you want, though not the direct one, but still makes sense.

When you do "Add to address book", then there you should choose the address book (we probably cannot skip this step, as searching all address books can be possible, but might be not as that efficient). Then you can do 3 things, as those buttons at the bottom. You can 'Cancel' this dialog, you can 'OK' to add it, and the last, not the least, on the left, I have 'Edit Full'. It calls the editing dialog for the contact.

The only thing is that it didn't open the existing contact (if any), but new one, and then merges again. Maybe I can change that "Edit Full" behaviour.
Comment 6 Milan Crha 2009-05-12 13:38:39 UTC
Created attachment 134498 [details] [review]
proposed evo patch

for evolution;

right-click over the address->Add to Address Book->Edit Full will try to find the contact in the selected address book first, then will edit either the old contact, or the new one.

Maybe the patch will seem quite hacky, but I tried to re-use as much of the code as possible.
Comment 7 Milan Crha 2009-10-15 18:36:00 UTC
Created commit d6034ed in evo master (2.29.1+)
Comment 8 Nick Jenkins 2009-10-16 00:02:27 UTC
Thank you, sounds good - I will give it a go after 2.30 is released! I was hoping to avoid an intermediate step (e.g. the "Edit Full" button), but understand that with large remote address books that there are more issues around giving acceptable performance. Depending on how it works it may turn out to be fine with this step, so will try it first once it's released.