6.0.0-git
2019-08-24

[#11773] Cleanup default address book mess
Summary Cleanup default address book mess
Queue Turba
Queue Version Git master
Type Enhancement
State Accepted
Priority 1. Low
Owners Horde Developers (at)
Requester jan (at) horde (dot) org
Created 2012-11-28 (2460 days ago)
Due
Updated 2016-01-27 (1305 days ago)
Assigned
Resolved
Milestone
Patch No

History
2016-01-27 17:00:23 Jan Schneider Type ⇒ Enhancement
State ⇒ Accepted
Priority ⇒ 1. Low
 
2013-08-27 10:47:45 Jan Schneider Comment #2 Reply to this comment
Any further opinions?
2012-11-28 13:41:18 Jan Schneider Comment #1
Type ⇒ Bug
State ⇒ Feedback
Priority ⇒ 2. Medium
Summary ⇒ Cleanup default address book mess
Queue ⇒ Turba
Assigned to Horde DevelopersHorde Developers
Milestone ⇒
Patch ⇒ No
Reply to this comment
We currently have 3 different ways to determine a default address 
book, some using each other, and used differently and different places.

1) default_dir preference
Only used in 2) and when importing contacts.
2) Turba_Api::getDefaultShare()
Only works on shares, looks for the 'default' share parameter (only 
set by Kolab), but falls back to default_dir pref, which could be any, 
even non-share address book. Only place used is the hook example for 
IMP's 'add_source' preference.
3) Turba::getDefaultAddressbook()
Simply picks the first share or the first of all address books, 
complete ignoring user preferences and is used in some API methods, as 
the default synchronization source, and to determine the initial 
address book after logging in.

It might make sense to have different defaults for general address 
book usage and for adding contacts, though:
- The default_dir pref mentions both adding and importing contacts, 
while it's only used for importing contacts.
- We don't do this in any other application. Granted, all other 
applications can display more than one source, so this makes Turba 
different.

Another problem: after (my) removal of the address book sorting and 
selection, there is no way anymore for the user to define the default 
address book (by moving it to the top of the list).

So my short-term suggestion is to use default_dir for all default 
address book selections, defaulting to whatever the backend provides 
as the default (Kolab), and falling back to the first of all available 
address books, with a priority to the user's own shares.

Saved Queries