Opened 4 years ago

Closed 4 years ago

#1486452 closed Feature Patches (fixed)

autocomplete shows entries without email

Reported by: grigora Owned by:
Priority: 5 Milestone: 0.4-stable
Component: Addressbook Version: git-master
Severity: normal Keywords: autocomplete


the address autocomplete feature shows any entry from the addressbook, also those without an email address.
as we are going to write an email i suppose this is annoying and moreover, as the list is limited, it draws useful space from valid email addresses.

see the attached patch

Attachments (2)

rcube-autocomplete.patch (612 bytes) - added by grigora 4 years ago.
rcube_autocomplete2.patch (1.4 KB) - added by toddtrann 4 years ago.

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by grigora

comment:1 Changed 4 years ago by grigora

  • Severity changed from minor to normal

comment:2 Changed 4 years ago by thomasb

Hmm, the address book should prevent you from saving records without e-mail address.

comment:3 Changed 4 years ago by grigora

you are right. but in my case the ab is an ldap directory that serves also other applications (for phone numbers, street addresses etc...)

comment:4 Changed 4 years ago by alec

It would be better to extend LDAP searching filter string, to not fetch these entries at all.

comment:5 Changed 4 years ago by grigora

i have tried setting the filter to "email=*" in config and it works like a charm.
the drawback (speaking as an ldap admin) is that someone will add a new entry instead of just adding the email attribute to the existing one, because he won't see it in rc ab. resulting in a duplicate.

comment:6 Changed 4 years ago by grigora

nevermind, i have solved by setting the address book read-only.

comment:7 Changed 4 years ago by alec

  • Milestone changed from later to 0.4-beta

comment:8 Changed 4 years ago by toddtrann

Although at first I agreed with Thomas, I can see that perhaps address book entries would have a blank email field for many strange reasons that we can't dream up (maybe the sysadmin migrated from an old system and imported the contacts direct to SQL?)

However your patch only addresses one of the conditions; there are two:

  • adding a single user with blank email address
  • adding group that contains a user with blank email address

I'll upload a patch that handles both. Although I see that the group totals do not agree with the number of users added to the autocomplete field, I think this is actually better than adding that user with blank address.


Changed 4 years ago by toddtrann

comment:9 Changed 4 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [25fdec59].

Note: See TracTickets for help on using tickets.