Connect. Communicate. Collaborate. Securely.

Home » Developer Zone » API/SDK Writers » Task problem with DTSTAMP (The DTSTAMP not change)
  •  
maltomare

Messages: 3
Karma: 0
Send a private message to this user
I use Kerio WebConsole to create and modify a task.

I read the task using CalDAV, this is my xml (using HTTP request in C# code)

<?xml version="1.0" encoding="utf-8" ?>
<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<D:prop>
<C:calendar-data>
<C:prop name="UID"/>
</C:calendar-data>
</D:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VTODO">
<C:time-range start="20150407T145917Z" end="20160506T145917Z"/>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>

the output is this:

BEGIN:VCALENDAR
PRODID:-//Kerio Technologies//Kerio Connect//EN
METHOD:PUBLISH
VERSION:2.0
X-VERSION-KMS:6.2.0
X-CALENDARSERVER-ACCESS:PUBLIC
BEGIN:VTIMEZONE
TZID:Amsterdam, Belgrade, Berlin, Brussels, Budapest, Madrid, Paris, Prague, Stockholm
BEGIN:STANDARD
DTSTART:19961027T030000
TZOFFSETTO:+0100
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19810329T020000
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VTODO
DTSTAMP:20150507T133558Z
UID:881d43d5-639d-4e3d-b525-a1d8b9b5d3e7
ORGANIZER:mailto:pacenza@test.it<mailto:pacenza<_at_>test.it>
SUMMARY:test
LOCATION:Rome
DTSTART;VALUE=DATE:20150507
DUE;VALUE=DATE:20150507
DTDUE;VALUE=DATE:20150507
CLASS:PUBLIC
PRIORITY:5
PERCENT-COMPLETE:0
SEQUENCE:1
END:VTODO
END:VCALENDAR

the field DTSTAMP:20150507T133558Z doesn't change anymore also if I edit the task inside the web console.

If I call again using my CalDav client the timestamp it's the some and so I can't syncronyze with my ERP.

Could you please help me if the timestamp really not change ?

Thanx in advance
Marco

[Updated on: Tue, 26 May 2015 15:07]

  •  
Jakub Schwarzmeier, Kerio

Messages: 67
Karma: 1
Send a private message to this user
You seem to:

1. execute calendar-query and receive some specific DTSTAMP
2. modify the task
3. execute calendar-query again

My understanding is that you expect to have a different DTSTAMP after step 3?

What do you mean exactly by Kerio WebConsole? What if you modify the task via CalDAV PUT request in step 2?

Btw, you should be able to find task change through DAV:getetag property on that task

<D:prop>
<D:getetag/>
</D:prop>
  •  
maltomare

Messages: 3
Karma: 0
Send a private message to this user
> 1. exactly, I expect a different DTSTAMP in my CalDAV http calling...

> 2. I've attached an image of my Kerio WebConsole

Btw, you should be able to find task change through DAV:getetag property on that task
<D:prop>
<D:getetag/>
</D:prop>

> I've used a HTTP request that you can see in my first post, and then Kerio server answer me with standard CalDAV message BEGIN...END

You can see that DTSTAMP not change !!!

To test my problem: download the calendar file of the task and see that DTSTAMP, it will be the same.

  • Attachment: Immagine.png
    (Size: 46.37KB, Downloaded 76 times)
  •  
Jakub Schwarzmeier, Kerio

Messages: 67
Karma: 1
Send a private message to this user
DTSTAMP is not changed by the Kerio Connect web client as there is "METHOD" property specified I guess.

RFC 5545, 3.8.7.2. seems to read:
In the case of an iCalendar object that specifies a "METHOD" property, this property specifies the date and time that the instance of the iCalendar object was created.

You can distinguish changed tasks when using getetag.

Req.

<?xml version="1.0" encoding="utf-8" ?>
<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<D:prop>
<C:calendar-data>
<C:prop name="UID"/>
</C:calendar-data>
<D:getetag/>
</D:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VTODO">
<C:time-range start="20140407T145917Z" end="20160806T145917Z"/>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>

Resp.

<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<c:calendar-data>BEGIN:VCALENDAR
PRODID:-//Kerio Technologies//Kerio Connect//EN
METHOD:PUBLISH
VERSION:2.0
X-VERSION-KMS:6.2.0
X-CALENDARSERVER-ACCESS:PUBLIC
BEGIN:VTODO
DTSTAMP:20150709T171403Z
UID:0f9afbce-f2d9-4597-a5a2-753ddd166cdc
SUMMARY:task+21
X-APPLE-SORT-ORDER:2147483647
PERCENT-COMPLETE:0
DESCRIPTION:fdds
X-NEXT-ALARM:20150708T233000Z
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:task+
TRIGGER;VALUE=DATE-TIME:20150708T233000Z
END:VALARM
END:VTODO
END:VCALENDAR
</c:calendar-data>
<a:getetag>14542d9361f445259bfbaf12434db7270000000100000007 </a:getetag>
</a:prop>
</a:propstat>


After making a change in the task, getetag value will change on subsequent calendar-query request.
  •  
maltomare

Messages: 3
Karma: 0
Send a private message to this user
Thank you very much.

So, I've this question :

The etag, a guid I suppose, change but I've not idea of when the modify is done ...

If I'd syncronize with a CRM in which way know that I can or can't accept the modify saved on calDAV server ?

Using a date/time I can easy decide the roles of sincronization, but It's impossible with GUID.
In this case I can only decide: win CRM or win CalDAvClient... Is it correct ?

Thanx in advance
  •  
Jakub Schwarzmeier, Kerio

Messages: 67
Karma: 1
Send a private message to this user
Quite correct. Etag is an opaque string which does not contain date/time type of data unfortunately.

You should choose who-win scenario. Even when having date/time from both CRM and CalDAVClient, you have to decide who wins in a case when modification dates are equal.
Previous Topic: Edit Custom Blacklist in Kerio Connect API
Next Topic: Creating users and passwords remotely to Kerio Control
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Tue Oct 17 05:45:57 CEST 2017

Total time taken to generate the page: 0.00468 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.