[jitsi-dev] [PATCH] Filling the display name field when adding contact from external source


#1

Hello,

When contacts are added from external source (Google Contacts for example),
the display name field in the form for adding the contact is always empty.
I changed the code to get the display name from the source contact and pass
it to the form.

The change can be tested if you search for contact, which doesn't exist in
the jitsi contact list and exists in any of the available external sources,
from the main window. Then you should press the Add button. In the add
contact form the display name should be filled if it is available.

I'm attaching the patch.

Regards.

add_ext_src_display_name.txt (3.43 KB)


#2

Hi Hristo,

Thanks for the patch!

I've just tested it and it's really very useful!

However, before committing it to trunk I wanted to ask you to add something
to it if you don't mind :slight_smile:

Currently the display name field is filled with the contact address
whenever there's no display name available. I think that we should leave it
empty instead of duplicating the contact address in such cases. WDYT?

Cheers,
Yana

···

On Fri, Feb 8, 2013 at 12:06 PM, Hristo Terezov <hristoterezov@gmail.com>wrote:

Hello,

When contacts are added from external source (Google Contacts for
example), the display name field in the form for adding the contact is
always empty. I changed the code to get the display name from the source
contact and pass it to the form.

The change can be tested if you search for contact, which doesn't exist in
the jitsi contact list and exists in any of the available external sources,
from the main window. Then you should press the Add button. In the add
contact form the display name should be filled if it is available.

I'm attaching the patch.

Regards.


#3

Hi guys,

We use an LDAP lookup against our AD for a contact source - which returns users as expected.

When we try and add as a contact although we can see the "display name" is coming across from AD (as it is listed in the search results) when we right click and Add Contact the display name field is blank and not the "display name" as shown in the results - I have attached an image to explain what I mean.

It would be very nice if the "display name" field is carried across when we add contacts from LDAP as well :slight_smile:

Thanks

Damian

···

From: Yana Stamcheva [mailto:yana@jitsi.org]

Sent: 11 February 2013 09:29
To: dev@jitsi.java.net
Subject: [jitsi-dev] Re: [PATCH] Filling the display name field when adding contact from external source

Hi Hristo,

Thanks for the patch!

I've just tested it and it's really very useful!

However, before committing it to trunk I wanted to ask you to add something to it if you don't mind :slight_smile:

Currently the display name field is filled with the contact address whenever there's no display name available. I think that we should leave it empty instead of duplicating the contact address in such cases. WDYT?

Cheers,
Yana

On Fri, Feb 8, 2013 at 12:06 PM, Hristo Terezov <hristoterezov@gmail.com<mailto:hristoterezov@gmail.com>> wrote:
Hello,

When contacts are added from external source (Google Contacts for example), the display name field in the form for adding the contact is always empty. I changed the code to get the display name from the source contact and pass it to the form.

The change can be tested if you search for contact, which doesn't exist in the jitsi contact list and exists in any of the available external sources, from the main window. Then you should press the Add button. In the add contact form the display name should be filled if it is available.

I'm attaching the patch.

Regards.


#4

Hello,

I'm attaching a new patch. I added a check if the display name is equal to
contact address the display name field is not filled. You can test this use
case with creating for example Google Contact with the same full name as
one of its contact details (gtalk account for example). When you try to add
this contact detail the display name in the form should be empty.

While I was implementing this I noticed that if I have a Google contact
with no display name it isn't listed in the contact list if I search for
it. Is this the desired behavior of the search or it is a bug? I think the
related code is
in /sip/communicator/impl/googlecontacts/GoogleContactsQuery.java
in onGoogleContactsEntry method in the begining if the display name isn't
available I think we skip the contact. Sorry If I'm wrong for this.

Regards,
Hristo.

add_ext_src_display_name.txt (3.63 KB)

···

On Mon, Feb 11, 2013 at 11:29 AM, Yana Stamcheva <yana@jitsi.org> wrote:

Hi Hristo,

Thanks for the patch!

I've just tested it and it's really very useful!

However, before committing it to trunk I wanted to ask you to add
something to it if you don't mind :slight_smile:

Currently the display name field is filled with the contact address
whenever there's no display name available. I think that we should leave it
empty instead of duplicating the contact address in such cases. WDYT?

Cheers,
Yana

On Fri, Feb 8, 2013 at 12:06 PM, Hristo Terezov <hristoterezov@gmail.com>wrote:

Hello,

When contacts are added from external source (Google Contacts for
example), the display name field in the form for adding the contact is
always empty. I changed the code to get the display name from the source
contact and pass it to the form.

The change can be tested if you search for contact, which doesn't exist
in the jitsi contact list and exists in any of the available external
sources, from the main window. Then you should press the Add button. In the
add contact form the display name should be filled if it is available.

I'm attaching the patch.

Regards.


#5

Hello Damian,

Have you applied the attached patch first?

If you haven't, please apply it first and then try again to add this
contact, the display name field should be filled.

Regards,
Hristo.

···

On Mon, Feb 11, 2013 at 2:34 PM, Damian Savage - Infinity Tracking < damian.savage@infinity-tracking.com> wrote:

Hi guys,****

** **

We use an LDAP lookup against our AD for a contact source – which returns
users as expected.****

** **

When we try and add as a contact although we can see the “display name” is
coming across from AD (as it is listed in the search results) when we right
click and Add Contact the display name field is blank and not the “display
name” as shown in the results – I have attached an image to explain what I
mean.****

** **

It would be very nice if the “display name” field is carried across when
we add contacts from LDAP as well J****

** **

Thanks****

** **

Damian****

** **

** **

*From:* Yana Stamcheva [mailto:yana@jitsi.org]
*Sent:* 11 February 2013 09:29
*To:* dev@jitsi.java.net
*Subject:* [jitsi-dev] Re: [PATCH] Filling the display name field when
adding contact from external source****

** **

Hi Hristo,****

** **

Thanks for the patch!****

** **

I've just tested it and it's really very useful!****

** **

However, before committing it to trunk I wanted to ask you to add
something to it if you don't mind :)****

** **

Currently the display name field is filled with the contact address
whenever there's no display name available. I think that we should leave it
empty instead of duplicating the contact address in such cases. WDYT?****

** **

Cheers,****

Yana****

** **

On Fri, Feb 8, 2013 at 12:06 PM, Hristo Terezov <hristoterezov@gmail.com>
wrote:****

Hello,****

** **

When contacts are added from external source (Google Contacts for
example), the display name field in the form for adding the contact is
always empty. I changed the code to get the display name from the source
contact and pass it to the form.****

** **

The change can be tested if you search for contact, which doesn't exist in
the jitsi contact list and exists in any of the available external sources,
from the main window. Then you should press the Add button. In the add
contact form the display name should be filled if it is available.****

** **

I'm attaching the patch.****

** **

Regards.****

** **