davical/testing/tests/regression-suite/2500-is-defined-Setup-PUT-resources-3.test
Andrew Ruthven 15d01c8bed Store DTSTART and DTEND from user in shadow columns
We want to store the calculated dtstart and dtend in the database so we can
use SQL to fetch records. However, we also need what the user sent us so we
can allow prop-filters to be used as well.

So we store what the user sends us in dtstart_orig and dtend_orig and only
use for relevant prop-filter reports.
2023-03-12 20:17:43 +01:00

42 lines
1.0 KiB
Plaintext

#
# PUT a todo into the database
#
TYPE=PUT
URL=http://regression.host/caldav.php/user1/events/hand-crafted-vtodo-2.ics
HEADER=User-Agent: DAViCal Testing/1.12.x
HEADER=Content-Type: text/calendar; charset=utf-8
AUTH=user1:user1
HEAD
BEGINDATA
BEGIN:VCALENDAR
PRODID:-//Puck Handcrafted VCAL//NONSGML Sunbird//EN
VERSION:2.0
BEGIN:VTODO
UID:19930901T130000Z-123407@host.com
DTSTAMP:19930901T130000Z
DUE:19930516T045959Z
SUMMARY:Status is set to COMPLETED, empty URL, CLASS set, from PUT
CLASS:PUBLIC
CATEGORIES:FAMILY,FINANCE
STATUS:COMPLETED
URL:
COMPLETED:19950101T000000Z
PRIORITY:1
END:VTODO
END:VCALENDAR
ENDDATA
QUERY
SELECT caldav_data.user_no, caldav_data.dav_etag, caldav_type, logged_user,
uid, dtstamp, dtstart, dtstart_orig, dtend, dtend_orig, due, summary,
location, description, priority, class, transp, rrule, url,
percent_complete, status, caldav_data AS " CalDAV Data"
FROM caldav_data
JOIN calendar_item AS ci USING(dav_name)
WHERE caldav_data.dav_name = '/user1/events/hand-crafted-vtodo-2.ics';
ENDQUERY