Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contacts in contact menu needs to be merged #4643

Open
LukasReschke opened this issue May 1, 2017 · 27 comments
Open

Contacts in contact menu needs to be merged #4643

LukasReschke opened this issue May 1, 2017 · 27 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: contacts menu

Comments

@LukasReschke
Copy link
Member

I do have many people multiple times because I do have them as local user account but also as part of the contacts app, we do need some deduplication happening here.

screen shot 2017-05-01 at 23 17 58

@ChristophWurst
Copy link
Member

Makes sense. Still, this might be tricky depending on the strategy. Do we have anything the uniquely identifies a contact entry?

@jancborchardt
Copy link
Member

Well … I’m still saying that some form of data sharing between the users management and Contacts app would be useful to fix this and get rid of our many notions of users.

This is not something to be tacked on in the Contacts menu, and share menu, and Mail app, and all the other autocomplete functions.

cc @karlitschek @daita @Henni @irgendwie @skjnldsv @icewind1991

@rullzer
Copy link
Member

rullzer commented May 2, 2017

Merging contacts is far from easy. And can often be wrong if you are on a large installation. There is currently no easy way to (reliably) determine that userX (a user on the system) is the same userX some people might have in their contacts.

Also (again large installations) sharing all the system contacts to the users addressbook doesn't seem like a solution.

@bjornnorman
Copy link

Haven't had time to check the code, but isn't there a chance both userX and the contact are registered with the same email address? If so, at least those matches could - with an acceptable degree of confidence - be merged in the list...?

@nickvergessen
Copy link
Member

Also by cloud-id?

@MorrisJobke
Copy link
Member

I guess this is out of scope for 12, right?

@ChristophWurst
Copy link
Member

I guess this is out of scope for 12, right?

Yes.

@ChristophWurst ChristophWurst removed this from the Nextcloud 12.0 milestone May 15, 2017
@jancborchardt jancborchardt added this to the Nextcloud 13 milestone May 15, 2017
@jancborchardt
Copy link
Member

jancborchardt commented May 15, 2017

I set it to 13 hence.

The points by @bjornnorman and @nickvergessen to merge based on email address and cloud-id are good. Additionally we now have the phone number, twitter handle and address in the personal settings, so it’s actually more and more which can overlap and be used as factors to merge on. cc @schiessle

@skjnldsv
Copy link
Member

skjnldsv commented Sep 27, 2017

Merging contacts is far from easy. And can often be wrong if you are on a large installation. There is currently no easy way to (reliably) determine that userX (a user on the system) is the same userX some people might have in their contacts.

The Jaro Winkler algorithm is the answer! ;)

But this only does the name. We need more data to really be ok to fusion contacts. :)

@Arvi89
Copy link

Arvi89 commented Oct 29, 2017

Hello,

If merging is not easy, why not do like mobile phone ? An option to merge contacts, but here that would be to merge contact with a cloud user. In the contact profile, add an option where we can search for a cloud user to merge with.

@j-ed
Copy link
Contributor

j-ed commented Oct 30, 2017

If a de-duplication cannot be realized using an automatic function, it might be worse to think about the creation of a general feature/app for that job. I'm currently using the Cardbook extension for Thunderbird together with Nextcloud which contains a really good function to merge contact information.
In a first step it shows all duplicate contacts listed in a column view and in a second step a user can decide which information should be kept and merged. Maybe one or other hint can be taken from that project. Just my two cents to the discussion.

@jancborchardt
Copy link
Member

One basic thing would be to compare email addresses. That's something which would solve it for company/organization setups like ourselves where users are basically the same as Contacts.

@ChristophWurst
Copy link
Member

One basic thing would be to compare email addresses. That's something which would solve it for company/organization setups like ourselves where users are basically the same as Contacts.

And fail hard for organizations with shared email accounts and contacts without an email address.

@jancborchardt
Copy link
Member

Let me spell out the rest of the implementation ;)

  • if 2 different contacts have the same email, ignore those from combining
  • if either contacts or users do not have an email address, also exclude

All I'm saying it's a way to fix it reasonably for some, if maybe a lot of setups. It would for ours. Why shoot that down?

@ChristophWurst
Copy link
Member

Why shoot that down?

That was not my intention, I just wanted to point out my concerns as it's more complex to do that what one would expect.

if 2 different contacts have the same email, ignore those from combining

Sounds reasonable, but will be computationally cost a lot of effort: imagine you've got 300 contacts. Then for each and every contact, you have to check whether any of the other contacts shares the email address, resulting in n*(n-1)=300*299=87900 comparisons. Depending on the implementation this will take some time.

@jancborchardt
Copy link
Member

Could it be done in the background? Also, it could always focus on the contacts just in view. Like do it for the contacts which are shown first (currently A–Z, soon most recently interacted with), then when you search through contacts and they are not combined yet, do those which are in view. And I guess cache the stuff.

Alright, then it gets complicated anyway. ;)

@ArtificialOwl
Copy link
Member

I would approach the issue like said @j-ed. On duplicate (display name in our case) give the user the ability to merge contacts

@MorrisJobke
Copy link
Member

Move to 14

@NoMoreNicksLeft
Copy link
Contributor

The simple answer is, within the contacts app, give us a field where we can select the NC user. Those who do not wish to use this field can leave it blank. Those who do, can do the work manually. I haven't looked at the RFC (is it even IETF?) for ical contacts or whatever it is, but I'm fairly certain it allows custom fields.

Not sure if there are security concerns (I'm an admin on mine, so I don't see it from a non-admin's perspective). Are we leaking sensitive info if a regular user can click that field and get a list of users?

@peacepenguin
Copy link

Lets perhaps address this in a simpler way. A way that would work for at least some use cases, and provide an alternative workaround path for those waiting on the discussed auto-merge concepts.

My use case is simple and the problem similar to the OP, with a solution presented that should be easy to implement as a new feature.

In an LDAP-user Nextcloud system, all users and groups are searchable and findable via the Nextcloud share dialogue search. However, email addresses in LDAP do not exist in the "contacts" app. So some users place a copy of the LDAP user info into Contacts so they can sync and see the contact via the built in CardDAV server, and via the Contacts app in nextcloud.

For users that do this, just like the OP, this creates confusion in their Share and Search UIs, because two or more versions of the same object now appear.

I think a simple solution that is easy to implement (at least easier than merge logic), is to create a configuration item like this: "Enable Contacts to be searchable via UI" yes/no this way, only the "current and correct" LDAP version of the User appears in the search.

This is a similar approach to the global setting that disables auto-complete entirely in the search UIs.

A further setting to enhance this feature, a user configurable toggle: "Enable Shared Contacts to be searchable via UI" yes/no this way I can see someone else's contact list they've shared with me in my Thunderbird / android via CardDAV, but I don't see these people when sharing files in Nextcloud Files app.

I think this is a simple feature to implement compared with merge logic, as it simply allows further customization to the "disable auto-complete" feature already available, which is an all-or-nothing approach to this problem that removes too much functionality to be used by most.

The approach I've presented should be able to eliminate the need for a "merge" approach entirely, as the administrator, or the end user, could decide what works best for them based on the chosen user backend and contact paradigm in use.

@sokolik87
Copy link

Hi, we have ~50 users and I solve it by deleting rows in oc_cards_properties table. I left only those added by LDAP.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Sep 12, 2018
@skjnldsv
Copy link
Member

@sokolik87 that means you're removing all the contacts of your users...

@sokolik87
Copy link

@skjnldsv not all. there were contacts with email john.doe@mynextcloudhostname.tld and contacts with email john.doe@mycompany.email.tld. So I removed contacts with john.doe@mynextcloudhostname.tld and it solved problem. I don't know if this is right solution, but it is workaround.

@MorrisJobke
Copy link
Member

This one didn't made it to 15 - let's move it to 16.

@Leopere
Copy link

Leopere commented Dec 17, 2018

Compared to Google's contacts next cloud's is virtually unusable because when I tried to import my contacts from google it kept failing after 100+ contacts so I had to re-import multiple times and also magically now I have like 6 copies of some of them but not all of them and there is zero batch management so now I have to manually delete like 700 contacts and figure out which of the 615 of them are not duplicates.

@skjnldsv skjnldsv added the 1. to develop Accepted and waiting to be taken care of label Jun 17, 2019
@Spartachetto
Copy link

@rullzer shouldn't this be moved to 19 milestone? This is an useful functionality, so if not already present, it should be there.
Or I am missing some important detail???

@nickvergessen nickvergessen removed this from the Nextcloud 17.0.4 milestone Mar 10, 2020
@ChristophWurst
Copy link
Member

it should be there

See https://nextcloud.com/developer/ for ways to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: contacts menu
Projects
None yet
Development

No branches or pull requests