Open respiranto opened 3 months ago
IMHO, #9606 does not fully solve this issue.
As written initially, I would expect only exact duplicates to be skipped (i.e.: same fields set, all fields equal).
It solved the topic from the title of this issue, which I found to be a good step forward.
If you insist on your position please re-open and change the title or create a new issue.
Title changed.
I seem not to be allowed to re-open the issue.
One problem I see with importing cards despite identical name and email address is, that in the list of contacts we show those two: name and email address. So in that list the two contacts would not be distinguishable.
I see the following options to handle this problem (two different objects with matching name and e-mail address(es)):
I think I prefer (b).
To clarify: in (b) you would still import the almost-duplicate contact?
To clarify: in (b) you would still import the almost-duplicate contact?
Yes.
I would be fine with that and merge such a PR but won't do it myself in the foreseeable future.
@alecpl What do you think?
The way it is implemented a contact is considered existing if another contact with same name OR email address exists. One could argue that should be "AND" not "OR".
Another story is what to do when a duplicate is found on import. One could argue that we need an option to choose from, as it could be: 1) skip, 2) replace, 3) merge (whatever that would mean), 4) add. A separate thing is informing the user what has been done.
That being said, I think current state is fine, but I would accept a pull request that implements such behavior selector(s) in the import dialog.
Also, you could argue that for duplicates in the import file itself you might want a separate solution, e.g. by checking for duplicates in it before attempting to import anything.
Prerequisites
Describe the issue
When importing contacts from a vCard file that contains two vcard objects with the same e-mail address, or one vcard object with an e-mail address that is already assigned to an existing contact, the contacts are treated as duplicates and one of them is not imported, with the message "Skipped 1 existing entries: [...]".
This does not happen if "Replace the entire address book" is activated on importing.
I would expect that a contact is only skipped on import if it would be an exact duplicate of another contact.
Further, I would expect that duplicates within a file are treated the same regardless of whether "Replace the entire address book" is activated on importing.
Example (note that vCard mandates CRLF as newline sequence):
Result of importing above example:
Originally reported at the Debian BTS as Bug 1078776, where I was asked to report the bug here instead.
What browser(s) are you seeing the problem on?
Firefox
What version of PHP are you using?
v8.2
What version of Roundcube are you using?
master / 58721e3037671888f82d75fd8e91a8622405af45
JavaScript errors
No response
PHP errors
No response