[CalendarServer-changes] [1642]
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jul 3 14:04:01 PDT 2007
Revision: 1642
http://trac.macosforge.org/projects/calendarserver/changeset/1642
Author: cdaboo at apple.com
Date: 2007-07-03 14:04:00 -0700 (Tue, 03 Jul 2007)
Log Message:
-----------
Make sure PARTSTAT is set for accepted events that do not have RSVP.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/schedulepostauto.xml
CalendarServer/trunk/twistedcaldav/itip.py
Added Paths:
-----------
CalDAVTester/trunk/Resource/scheduleauto/19.ics
CalDAVTester/trunk/Resource/scheduleauto/20.ics
Added: CalDAVTester/trunk/Resource/scheduleauto/19.ics
===================================================================
--- CalDAVTester/trunk/Resource/scheduleauto/19.ics (rev 0)
+++ CalDAVTester/trunk/Resource/scheduleauto/19.ics 2007-07-03 21:04:00 UTC (rev 1642)
@@ -0,0 +1,19 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+METHOD:REQUEST
+PRODID:-//ORACLE//NONSGML Windows Desktop Calendar 10.1.2.0.5.278//EN
+BEGIN:VEVENT
+UID:20060110T231240Z-4011c71-187-6f73-19
+DTSTART:20060308T200000Z
+DTEND:20060308T210000Z
+ATTENDEE;CN=User 02;RSVP=TRUE:$principal2:
+ATTENDEE;CN=Resource 01:$rprincipal1:
+CREATED:20060110T231240Z
+DESCRIPTION:+1 605 990 0100\nAccess: 879307#
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=Cyrus Daboo:$principal:
+STATUS:CONFIRMED
+SUMMARY:TC Realtime
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/scheduleauto/20.ics
===================================================================
--- CalDAVTester/trunk/Resource/scheduleauto/20.ics (rev 0)
+++ CalDAVTester/trunk/Resource/scheduleauto/20.ics 2007-07-03 21:04:00 UTC (rev 1642)
@@ -0,0 +1,18 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//ORACLE//NONSGML Windows Desktop Calendar 10.1.2.0.5.278//EN
+BEGIN:VEVENT
+UID:20060110T231240Z-4011c71-187-6f73-19
+DTSTART:20060308T200000Z
+DTEND:20060308T210000Z
+ATTENDEE;CN=User 02;RSVP=TRUE:$principal2:
+ATTENDEE;CN=Resource 01;PARTSTAT=ACCEPTED:$rprincipal1:
+CREATED:20060110T231240Z
+DESCRIPTION:+1 605 990 0100\nAccess: 879307#
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=Cyrus Daboo:$principal:
+STATUS:CONFIRMED
+SUMMARY:TC Realtime
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
Modified: CalDAVTester/trunk/scripts/tests/schedulepostauto.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/schedulepostauto.xml 2007-07-03 19:59:13 UTC (rev 1641)
+++ CalDAVTester/trunk/scripts/tests/schedulepostauto.xml 2007-07-03 21:04:00 UTC (rev 1642)
@@ -179,6 +179,135 @@
</test>
</test-suite>
+ <test-suite name='POST non-recurring without conflict, no-rsvp' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>Do POST</description>
+ <request>
+ <method>POST</method>
+ <header>
+ <name>Originator</name>
+ <value>$principal:</value>
+ </header>
+ <header>
+ <name>Recipient</name>
+ <value>$principal2:, $rprincipal1:</value>
+ </header>
+ <ruri>$pathprefix:/$outbox:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/scheduleauto/19.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELAY</method>
+ <ruri>6</ruri>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>No item in user01 Outbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$pathprefix:/$outbox:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/scheduleauto/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>0</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>One item in user02 Inbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>GETNEW</method>
+ <ruri>$pathprefix2:/$inbox:/</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/scheduleauto/19.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>No items in resource01 Inbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$rpathprefix1:/$inbox:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/scheduleauto/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>0</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>One item in resource01 Calendar</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="yes">
+ <method>GETNEW</method>
+ <ruri>$rpathprefix1:/calendar/</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/scheduleauto/20.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>No item in resource01 Outbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$rpathprefix1:/$outbox:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/scheduleauto/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>0</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>One item in user01 Inbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$pathprefix:/$inbox:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/scheduleauto/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>1</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
<test-suite name='Update to previous request - no auto-reply' ignore='no'>
<test name='1' ignore='no'>
<description>Do POST</description>
@@ -523,7 +652,7 @@
</request>
</test>
<test name='5' ignore='no'>
- <description>One item in resource01 Calendar</description>
+ <description>Two items in resource01 Calendar</description>
<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
<method>PROPFIND</method>
<ruri>$rpathprefix1:/calendar/</ruri>
@@ -535,7 +664,7 @@
<callback>multistatusItems</callback>
<arg>
<name>count</name>
- <value>1</value>
+ <value>2</value>
</arg>
</verify>
</request>
@@ -652,7 +781,7 @@
</request>
</test>
<test name='5' ignore='no'>
- <description>One item in resource01 Calendar</description>
+ <description>Two items in resource01 Calendar</description>
<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
<method>PROPFIND</method>
<ruri>$rpathprefix1:/calendar/</ruri>
@@ -664,7 +793,7 @@
<callback>multistatusItems</callback>
<arg>
<name>count</name>
- <value>1</value>
+ <value>2</value>
</arg>
</verify>
</request>
@@ -906,8 +1035,8 @@
</request>
</test>
<test name='5' ignore='no'>
- <description>Two items in resource01 Calendar</description>
- <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <description>Three items in resource01 Calendar</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="yes">
<method>PROPFIND</method>
<ruri>$rpathprefix1:/calendar/</ruri>
<data>
@@ -918,7 +1047,7 @@
<callback>multistatusItems</callback>
<arg>
<name>count</name>
- <value>2</value>
+ <value>3</value>
</arg>
</verify>
</request>
@@ -1035,7 +1164,7 @@
</request>
</test>
<test name='5' ignore='no'>
- <description>Two items in resource01 Calendar</description>
+ <description>Three items in resource01 Calendar</description>
<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
<method>PROPFIND</method>
<ruri>$rpathprefix1:/calendar/</ruri>
@@ -1047,7 +1176,7 @@
<callback>multistatusItems</callback>
<arg>
<name>count</name>
- <value>2</value>
+ <value>3</value>
</arg>
</verify>
</request>
@@ -1176,7 +1305,7 @@
<callback>multistatusItems</callback>
<arg>
<name>count</name>
- <value>1</value>
+ <value>2</value>
</arg>
</verify>
</request>
Modified: CalendarServer/trunk/twistedcaldav/itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/itip.py 2007-07-03 19:59:13 UTC (rev 1641)
+++ CalendarServer/trunk/twistedcaldav/itip.py 2007-07-03 21:04:00 UTC (rev 1642)
@@ -437,7 +437,7 @@
Check whether a reply to the given iTIP message is needed. A reply will be needed if the
RSVP=TRUE. A reply will either be positive (accepted
invitation) or negative (denied invitation). In addition we will modify calendar to reflect
- any new state (e.g. remove RSVP, set PART-STAT to ACCEPTED or DECLINED).
+ any new state (e.g. remove RSVP, set PARTSTAT to ACCEPTED or DECLINED).
@param request: the L{twisted.web2.server.Request} for the current request.
@param principal: the L{CalendarPrincipalFile} principal resource for the principal we are dealing with.
@@ -501,16 +501,13 @@
return
# Look for specific parameters
+ rsvp = False
if "RSVP" in attendeeProp.params():
- if attendeeProp.params()["RSVP"][0] != "TRUE":
- yield False, None, accepted
- return
- else:
- yield False, None, accepted
- return
+ if attendeeProp.params()["RSVP"][0] == "TRUE":
+ rsvp = True
- # Now modify the original component
- del attendeeProp.params()["RSVP"]
+ # Now modify the original component
+ del attendeeProp.params()["RSVP"]
if accepted:
partstat = "ACCEPTED"
@@ -544,7 +541,7 @@
if (attendee.value() != attendeeProp.value()):
replycal.mainComponent().removeProperty(attendee)
- yield True, replycal, accepted
+ yield rsvp, replycal, accepted
checkForReply = deferredGenerator(checkForReply)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070703/3179b58a/attachment.html
More information about the calendarserver-changes
mailing list