Bug 320948 - Copying Address from DAV resource to another collection (on same server) return error 412
Summary: Copying Address from DAV resource to another collection (on same server) retu...
Status: RESOLVED FIXED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: 4.10
Platform: Debian stable Linux
: NOR critical
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-09 08:16 UTC by Ingo Ratsdorf
Modified: 2016-10-27 19:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.3


Attachments
testvcard.vcf (344 bytes, text/plain)
2013-11-08 23:04 UTC, Eugen Albiker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Ratsdorf 2013-06-09 08:16:16 UTC
When trying to copy an address from one DAV collection to another, the address appears in the collection as expected, however is never synced to the server.
Both collections are sitting on the same server but belong to different users.
In Akonadi Console, the following is logged:

NotificationManager::notify ( Item (23354, b23353) in collection 134 added )
AgentBase(akonadi_davgroupware_resource_8): Unable to add item: There was a problem with the request. The item has not been created on the server. An unexpected error (412) occurred while attempting to upload https://ingo@ratsdorf.dyndns.org/groupdav.php/ingo/addressbook-family/addressbook-490-cbd2bc7d9e888bb71460725c836b157f.vcf. (412).

Reproducible: Always

Steps to Reproduce:
1. Copy address from one DAV server collection to another
2. Address appears as expected
3. Address is never synced to the server however stays in the destination collection
Actual Results:  
Address appears as expected, destination collection, however is never synced to the server.


Expected Results:  
The address is copied to the destination and synced or an error displayed and the destination address deleted again.

Since the original UUID is copied, the server rejects the creation in the other collection with the same UUID.
However Akonadi/Kaddrssbook does not delete the destination address and it stays in there as a dead entry that will neve sync. No feedback is given to the user, the destination address is not deleted.

Suggested action (either or):
a) if destination is on same server, either copy the address without UUID thus allowing its creation. Or display a warning about same UUID on same server and let user decide whether he wants to copy anyway.
b) Or try to store destination address and if error occurs, delete destination address thus avoiding dead entry.

Only workaround to copy address at this stage is to export address, edit it and delete UUID from VCF file, save and import into destination collection.

I have set this report to critical because it actually causes the loss of data.
Image a user copied addresses from one collection to another, the deletes the original collection. All data gone since it will never sync the destination data and will never show a warning.
Comment 1 Ingo Ratsdorf 2013-10-29 18:34:10 UTC
Still not addressed und still unconfirmed?
Comment 2 Eugen Albiker 2013-11-08 23:04:52 UTC
Created attachment 83434 [details]
testvcard.vcf
Comment 3 Eugen Albiker 2013-11-08 23:05:27 UTC
Hi,
I have additional infos here.

Using:  
ii  kaddressbook                4:4.11.2-0ubuntu1  amd64

I export a Google-contact from kaddressbook and get the file "testvcard.vcf" When I import this VCF into a DAV-Recource (owncloud in my case) the Contact is never synced to the DAV-Resource.

But if i delete the UID line from the "testcard.vcf" and import the contact to the DAV-Resource, then the conact will be synchronised!! --> Correct

This only happens if I import the contact into the DAV-Resource in kadressbook.

More: If I Import the contact in owncloud (with OR without the UID), then the contact is synced to kadressbook, and I can edit it in kadressbook and it will be synced back to the 
owncloud-DAV-Recource.

Need any more Info, then I will try to help.

Greetings
Eugen
Comment 4 Eugen Albiker 2013-11-13 23:25:01 UTC
Hi,
bug is still there in KDE 4.11.3

dpkg -l kaddressbook
ii  kaddressbook                4:4.11.3-0ubuntu0. amd64

Greetings
Eugen
Comment 5 Denis Kurz 2016-09-24 20:52:42 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kaddressbook (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 6 Eugen Albiker 2016-10-18 21:18:19 UTC
This bug can be closed, because the issue is resolved.
Tested Version:
- KAddressBook 5.2.3
- KDE Frameworks 5.26.0
- QT 5.6.1
- Kubuntu 2016.10

Greetings
Eugen