[Owncloud] contacts VCV REV field update problem
Ismail YENIGUL
ismail.yenigul at surgate.com
Fri May 3 13:04:30 UTC 2013
Hi Thomas,
Thanks for your feedback.
I talked with my developers. They are deleting and re-adding the contacts :)
But they say that there is no edit method in the webdav client called
WebDAV .NET
by the way we also delete and re-add the caldav events, owncloud use our
LAST-MODIFIED value in the .ics file
Then we thought that something is wrong with carddav?
My question is what is the proper way to handle update caldav/carddav?
Thanks
On 3.5.2013 15:41, Thomas Tanghus wrote:
> Hi Ismail
>
> When adding new contacts their properties may get updated because we store
> them internally as vCard 3.0, and because we then can't guarantee that the
> contact is identical after adding, the REV property is updated.
> The method you mention is *only* called when adding contacts, so my guess is
> it's rather in the edit() method [1] it gets updated. I hope you're not
> syncing by deleting and re-adding the vCards? ;)
>
> It's a valid issue, and I will see to change it so that if contacts are
> updated via CardDAV the REV will only be updated/added if it doesn't exist.
>
> BTW, wouldn't it be a more reliable method to check for the Etag being send?
> It is my understanding that most *DAV sync clients use that.
>
> [1] https://github.com/owncloud/apps/blob/stable5/contacts/lib/vcard.php#L513
>
> On Friday 03 May 2013 12:13 Ismail YENIGUL wrote:
>> We developed a outlook contacts and calendar sync from a caldav/carddav
>> server.
>> We are making tests on owncloud. There is no problem with calendar part.
>> But we have a problem about update date of the contacts. We create a vcf
>> file on the client side that contains REV field like the following
>>
>> PRODID:-//ownCloud//NONSGML Contacts 0.2.5//EN
>> *REV:2013-04-29T13:40:53+00:00*
>> FN:Yusuf Cemal
>> N:Cemal;Yusuf;;
>> ...
>>
>> When we upload this file to owncloud via DAV. Owncloud does not take
>> care of this field and inserts own "last change date" to the database.
>> This causes continues update for the same contacts on the outlook side.
>> Is there any way to disable auto update of last change on the owncloud
>> side if the REV is defined in VCF file.
>>
>> It seems that the problem is at the following lines:
>> # vi apps/contacts/lib/vcard.php
>>
>> /**
>> * @brief Tries to update imported VCards to adhere to rfc2426
>> (VERSION: 3.0) and add mandatory fields if missing.
>> * @param aid Address book id.
>> * @param vcard A Sabre\VObject\Component of type VCARD (passed
>> by reference).
>> */
>> protected static function *updateValuesFromAdd*($aid, &$vcard)
>> { // any suggestions for a better method name? ;-)
>>
>>
>>
>> }
>> if(self::trueUID($aid, $uid)) {
>> $vcard->{'UID'} = $uid;
>> }
>> *$now = new \DateTime;**
>> ** $vcard->{'REV'} = $now->format(\DateTime::W3C);*
>> }
>>
>>
>> Thanks
--
Signature
Surgate Logo
Ismail YENIGUL
CTO
Tel: +90 533 747 3665
Fax: 0216 470 95 08
ismail.yenlgul at surgate.com
www.surgatelabs.com www.srntools.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130503/0b39368d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gihfdhji.gif
Type: image/gif
Size: 7531 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130503/0b39368d/attachment.gif>
More information about the Owncloud
mailing list