Default to Name field as nickname when adding a contact


Currently when someone searches for a user, then right-click the search result and selects "Add as a contact", Spark presents a contact addition dialog, but it uses user's username to populate Nickname field. Even if this user has Name field set (or some other fields like Full Name, Nickname, etc. filled in his vCard). Spark could do a cycle checking whether some field is available (say first check for Name, then for Full Name, then for Nickname). Or at least try to default to Name field instead.




October 23, 2016, 10:16 AM
October 23, 2016, 9:50 AM

The code selecting which field to use is only operating with the columns on the search dialog. These columns are: JID, Username, Name, Email. I have decided to make Name as a first choice. And if Name is empty it will fallback to Username (as it was before). Email could work for some, but making it a second choice doesn't seem a good idea (many might not like having emails in their roster and would prefer username instead).

October 23, 2016, 9:16 AM

Have renamed the ticket and updated the description. Also re-qualified this as an Improvement. Spark behaves like that as it was designed this way, not a bug in my book.

August 22, 2009, 7:57 PM

this reminded me about the patch provided by one user:

David Wilshire
August 21, 2009, 6:20 PM

Hi, all.

I discovered this issue as we were evaluating Spark/Openfire and how it handles LDAP information, and would like to throw in my two cents worth.

In our environment, USERNAME is a unique employee number (a Single Signon number), NAME is the {displayName} (Last, First) from the LDAP record, and EMAIL is {mail} (of course). Openfire sends all three fields and the JID in the search result.

When selecting a contact from the directory search window, the fields in the Add Contact window are populated with Fully qualified JID in the "Username" field and the bare JID in the "Nickname" field. Adding the user to the roster like this displayes the contact's employee number, which is much less meaningful than the contact's name.

IMHO it would be more appropriate to populate "Nickname" with the vCard "Name", rather than bare JID, and to continue populating the "Username" field with the fully qualified JID.








Todd Getz