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 448441 - blank default addressbook in quick-add
blank default addressbook in quick-add
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Tasks
2.22.x (obsolete)
Other All
: High critical
: ---
Assigned To: Milan Crha
Evolution QA team
: 444346 538854 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-06-17 10:41 UTC by Oded Arbel
Modified: 2013-09-13 00:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
contact quick add dialog (16.98 KB, image/png)
2007-06-17 19:51 UTC, Oded Arbel
  Details
contact quick add dialog with "select address book" pull down open (17.26 KB, image/png)
2007-06-17 19:52 UTC, Oded Arbel
  Details
proposed evo patch (2.12 KB, patch)
2007-11-15 15:45 UTC, Milan Crha
none Details | Review
proposed evo patch ][ (3.26 KB, patch)
2008-01-03 15:14 UTC, Milan Crha
committed Details | Review

Description Oded Arbel 2007-06-17 10:41:22 UTC
Version: 2.10

When choosing "add to address book" from RMB menu of an email address, "OK" and "Edit full" buttons have no effect unless a valid entry is chosen in the "Select address book" pull down, but no error message is generated.

I think that this is a grave usability issue - when I tried to add many addresses quickly, by using RMB->add->ok, and no errors where displayed but no addresses were added to any address book. 

The way I see it, there are two ways to solve the problem - 
(1) show an error dialog when no address book is selected and "ok" is clicked. Edit full should work even when no address book is selected as you can choose the address book in the following dialog (the full contact address dialog should generate an error message if no address book is selected in the "where" entry).
(2) assume a default address book and preselect it in the "add to address book" dialog. The default address book can be the first local address book, or the last address book selected in an "add to address book" dialog.


Distribution: Fedora release 7 (Moonshine)
Gnome Release: 2.18.2 2007-05-28 (Red Hat, Inc)
BugBuddy Version: 2.18.0
Comment 1 André Klapper 2007-06-17 16:47:01 UTC
what is a *non*-valid addressbook entry in that dialog? is there any default entry for you?
Comment 2 Oded Arbel 2007-06-17 19:51:55 UTC
Created attachment 90164 [details]
contact quick add dialog

Please consult this screen shot and the next one. As you can clearly see, there the "select address book" pull down has no default value
Comment 3 Oded Arbel 2007-06-17 19:52:53 UTC
Created attachment 90165 [details]
contact quick  add dialog with "select address book" pull down open

And in this attachment you can see what the "select address book" pull down offers .
Comment 4 Oded Arbel 2007-06-17 19:54:46 UTC
So, in the above two screen shots, if I choose "personal" and click "ok" or "edit full", then what you'd expect happens. but if don't (either don't open the pull down at all, or opens it and close it without choosing), then "ok" and "edit full" silently fail - the same effect as "cancel".
Comment 5 Milan Crha 2007-11-15 15:45:40 UTC
Created attachment 99146 [details] [review]
proposed evo patch

for evolution;

I would prefer to disable those buttons when there is no default source selected. The patch does exactly that.
Comment 6 Oded Arbel 2007-11-15 16:48:52 UTC
If I understand correctly, this patch disables the button if no source is selected (regardless of the "defaultness" of sources selected or not). I've just noticed the "mark this as default" feature of address books, which seems to suggest that some address books can be "the default address book" which means (at least) that they get automatically selected in the quick add dialog - If I understand correctly your patch does not take into consideration the default status of address books, right ?

(weird that you can have more then one address book as the "default address book", in which case the one selected by the quick add dialog is the one that sorts first in a case insensitive alphabetical sort).
Comment 7 Milan Crha 2007-11-15 18:20:15 UTC
If you have one address book selected as default, then all will be enabled as expected, but if you do not have any default address book, then buttons will be disabled, so it respects your choice of default address book, the patch only ensures that you cannot OK/Edit Full if there is no source selected.

You cannot have more than one address book selected as default, you can none, but not more than one. When you check on one, then the second (if any) will be unchecked. Just try :)
Comment 8 Oded Arbel 2007-11-15 19:02:05 UTC
actually i did try - several combinations ( hence my comment about sort order). With evolution in gnome 2.20 you can have any number of  address books marked as default.
Comment 9 André Klapper 2007-12-29 20:09:57 UTC
on my evolution 2.21.5, there is no addressbook marked as default.

i get the "quick-add a contact" dialog without an addressbook preselected. the
OK button is not disabled, clicking it does not add the contact anywhere, but
the users *thinks* it has been added to an addressbook. this results in loss of
contact data.



and if i click "full edit" in the quick-add dialog, i get the following shell
output:

===evolution:===
(evolution:5172): libebook-CRITICAL **: file e-book.c: line 3808: assertion
`source && E_IS_SOURCE (source)' failed
(evolution:5172): libebook-CRITICAL **: e_book_get_source: assertion `book &&
E_IS_BOOK (book)' failed
(evolution:5172): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT (object)' failed
(evolution:5172): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT (object)' failed
(evolution:5172): libebook-CRITICAL **: e_book_async_open: assertion `book &&
E_IS_BOOK (book)' failed
(evolution:5172): e-data-server-ui-CRITICAL **:
e_source_combo_box_set_active_uid: assertion `gtk_tree_row_reference_valid
(reference)' failed

===e-d-s:===
(evolution-data-server-2.22:2698): GLib-GObject-WARNING **: value
"((ECalSourceTypeEnum) 4)" of type `ECalSourceTypeEnum' is invalid or out of
range for property `source-type' of type `ECalSourceTypeEnum'



solütion:

1) evolution should check at startup whether an addressbook is selected as
default. if not, then evolution should silently set the default flag for the
system addressbook.
2) the OK button in the quick-add dialog should be insensitive if no
addressbook is selected.
3) i don't know if this failure can also happen with calendars, memo lists and
task lists. the additional code of steps 1 and 2 should probably also be added
to these components (don't duplicate code but share it, please).
Comment 10 André Klapper 2007-12-29 20:10:09 UTC
*** Bug 444346 has been marked as a duplicate of this bug. ***
Comment 11 Srinivasa Ragavan 2008-01-01 09:03:10 UTC
Hmm, the solution seems fine to me.
Comment 12 Milan Crha 2008-01-03 12:52:03 UTC
(In reply to comment #9)
> on my evolution 2.21.5, there is no addressbook marked as default.
> 
> i get the "quick-add a contact" dialog without an addressbook preselected. the
> OK button is not disabled, clicking it does not add the contact anywhere, but
> the users *thinks* it has been added to an addressbook. this results in loss of
> contact data.

sure, but the patch fixes it, right?
Comment 13 André Klapper 2008-01-03 14:00:58 UTC
okay, as i have a testcase here, i have tested the patch.

it does set a default addressbook here, but the second time i wanted to quick-add a contact the buttons are enabled but no addressbook is *displayed* in the dropdown. nevertheless the contact gets added to the default book, so the bug is only about displaying...
Comment 14 Milan Crha 2008-01-03 15:14:16 UTC
Created attachment 102052 [details] [review]
proposed evo patch ][

for evolution;

I guess you have no source with "default" property, and also without "system", same as me. There is a message on console:
e-data-server-ui-CRITICAL **: e_source_combo_box_set_active_uid: assertion `gtk_tree_row_reference_valid (reference)' failed

This patch works with this better. Also the OK/Edit is enabled only if any item is selected in combo (which wasn't in previous patch).
Comment 15 André Klapper 2008-01-03 15:56:37 UTC
> There is a message on console:
> e-data-server-ui-CRITICAL **: e_source_combo_box_set_active_uid: assertion
> `gtk_tree_row_reference_valid (reference)' failed

exactly. same here.
Comment 16 Bob Gustafson 2008-01-09 17:31:29 UTC
I just now added an address from an email that was sent to me.

Message -> Add Sender to Address Book

I needed to select an address book at the next dialog (Personal).

-------

When I went to send a new email to that person, the address did NOT show up in the left panel listing of my Personal address book 'Select Contacts from Address book'

However, if I did a 'Search', the name was found. Thereafter, the name WAS in the left panel listing.

------

There seems to be some 'refreshing' problems with the display of data in the 'Select Contacts from Address book' panel.
Comment 17 Milan Crha 2008-01-09 18:44:37 UTC
Bob, can you look for (and maybe file) a separate bug for it, please? Thanks in advance.
Comment 18 Bob Gustafson 2008-01-09 19:16:08 UTC
Good thought.

I filled out the bug report and then decided to test it more thoroughly. During my testing, I COULD see the newly added email address.

So, either I missed it before, or I had a stale contacts window open somewhere that was adopted by the clicking on the 'To:' button.

Probably just missed it. I abandoned the bug report...
Comment 19 Srinivasa Ragavan 2008-01-10 11:36:12 UTC
Milan,

I think some bits missing. At times both my buttons (OK and Edit) are disabled. I dont know the specific scenarios. But happens frequently. 
Comment 20 Milan Crha 2008-01-10 13:18:01 UTC
OK, there is no such problem, but other is. When I added there a check for writability of the address book (e_book_is_writable), then I didn't realize that the variable used in that function is initialized to proper state after the e_book is opened, before that it returns FALSE. So that's the issue number one.

The second issue is that the newly created address books are unaccessible until you select them in Contacts component, so they became initialized properly (I'm just guessing based on my observations). I did add the e_book_open to the source_changed and I added there an error check too and for such address books it just shows on the console: "EBookStatus returned 20". What ever it means, it works as soon as I click on this address book in Contacts.

The conclusion: You had disabled buttons for all closed address books, so if you just run fresh evo and eds and was right in the mail, then all those things was disabled. I can fix it, that's easy. Either remove the writability check or do the e_book_open when source changes in the combobox.

Hard to say what I can do with the second thing (uninitialized address book store).
Comment 21 Srinivasa Ragavan 2008-01-10 14:56:44 UTC
Milan disable the call for now. I dont think we have to open books there and commit it.
Comment 22 Milan Crha 2008-01-10 15:57:09 UTC
Committed to trunk. Committed revision 34791.

As we discussed on IRC, I just changed it, added a message and committed to trunk.
Feel free to change the text of the message. I also announced new strings.
Comment 23 Susana 2008-06-24 07:41:51 UTC
*** Bug 538854 has been marked as a duplicate of this bug. ***