[CalendarServer-changes] [4373] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jun 24 10:13:48 PDT 2009
Revision: 4373
http://trac.macosforge.org/projects/calendarserver/changeset/4373
Author: cdaboo at apple.com
Date: 2009-06-24 10:13:47 -0700 (Wed, 24 Jun 2009)
Log Message:
-----------
SCHEDULE-FORCE-SEND support.
Modified Paths:
--------------
CalendarServer/trunk/run
CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
CalendarServer/trunk/twistedcaldav/scheduling/implicit.py
CalendarServer/trunk/twistedcaldav/scheduling/itip.py
CalendarServer/trunk/twistedcaldav/scheduling/processing.py
CalendarServer/trunk/twistedcaldav/scheduling/test/test_icaldiff.py
CalendarServer/trunk/twistedcaldav/scheduling/test/test_itip.py
Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run 2009-06-24 17:08:09 UTC (rev 4372)
+++ CalendarServer/trunk/run 2009-06-24 17:13:47 UTC (rev 4373)
@@ -727,7 +727,7 @@
caldavtester="${top}/CalDAVTester";
-svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 4364;
+svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 4372;
#
# PyFlakes
Modified: CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py 2009-06-24 17:08:09 UTC (rev 4372)
+++ CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py 2009-06-24 17:13:47 UTC (rev 4373)
@@ -70,7 +70,7 @@
"LAST-MODIFIED",
))
calendar.removeXProperties()
- calendar.removePropertyParameters("ATTENDEE", ("RSVP", "SCHEDULE-STATUS",))
+ calendar.removePropertyParameters("ATTENDEE", ("RSVP", "SCHEDULE-STATUS", "SCHEDULE-FORCE-SEND",))
calendar.normalizeAll()
return calendar
@@ -206,9 +206,9 @@
for new_attendee in new_comp.properties("ATTENDEE"):
- # Whenever RSVP is explicitly set by the Organizer we assume the Organizer
+ # Whenever SCHEDULE-FORCE-SEND is explicitly set by the Organizer we assume the Organizer
# is deliberately overwriting PARTSTAT
- if new_attendee.params().get("RSVP", ["FALSE",])[0] == "TRUE":
+ if new_attendee.params().get("SCHEDULE-FORCE-SEND", ["",])[0] == "REQUEST":
continue
# Transfer parameters from any old Attendees found
@@ -439,20 +439,12 @@
replyNeeded = False
- # ATTENDEE/PARTSTAT/RSVP
+ # ATTENDEE/PARTSTAT
serverAttendee = serverComponent.getAttendeeProperty((self.attendee,))
clientAttendee = clientComponent.getAttendeeProperty((self.attendee,))
if serverAttendee.params().get("PARTSTAT", ("NEEDS-ACTION",))[0] != clientAttendee.params().get("PARTSTAT", ("NEEDS-ACTION",))[0]:
serverAttendee.params()["PARTSTAT"] = clientAttendee.params().get("PARTSTAT", "NEEDS-ACTION")
replyNeeded = True
- if serverAttendee.params().get("RSVP", ("FALSE",))[0] != clientAttendee.params().get("RSVP", ("FALSE",))[0]:
- if clientAttendee.params().get("RSVP", ("FALSE",))[0] == "FALSE":
- try:
- del serverAttendee.params()["RSVP"]
- except KeyError:
- pass
- else:
- serverAttendee.params()["RSVP"] = ["TRUE",]
# Transfer these properties from the client data
replyNeeded |= self._transferProperty("X-CALENDARSERVER-PRIVATE-COMMENT", serverComponent, clientComponent)
@@ -596,10 +588,6 @@
attendee = component.getAttendeeProperty((self.attendee,))
partstatChanged = attendee.params().get("PARTSTAT", ("NEEDS-ACTION",))[0] != "DECLINED"
attendee.params()["PARTSTAT"] = ["DECLINED",]
- try:
- del attendee.params()["RSVP"]
- except KeyError:
- pass
prop = component.getProperty("X-APPLE-NEEDS-REPLY")
if prop:
component.removeProperty(prop)
Modified: CalendarServer/trunk/twistedcaldav/scheduling/implicit.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/implicit.py 2009-06-24 17:08:09 UTC (rev 4372)
+++ CalendarServer/trunk/twistedcaldav/scheduling/implicit.py 2009-06-24 17:13:47 UTC (rev 4373)
@@ -262,7 +262,7 @@
self.internal_request = True
self.except_attendees = attendees
self.changed_rids = None
- self.rsvps = None
+ self.reinvites = None
# Get some useful information from the calendar
@@ -274,14 +274,11 @@
self.originatorPrincipal = self.organizerPrincipal
self.originator = self.organizer
- # Need to re-insert RSVP=TRUE for any NEEDS-ACTION
-
# We want to suppress chatty iMIP messages when other attendees reply
self.request.suppressRefresh = False
for attendee in self.calendar.getAllAttendeeProperties():
if attendee.params().get("PARTSTAT", ["NEEDS-ACTION"])[0] == "NEEDS-ACTION":
- attendee.params()["RSVP"] = ["TRUE",]
self.request.suppressRefresh = True
self.request.doing_attendee_refresh = True
@@ -467,7 +464,7 @@
self.oldcalendar = None
self.changed_rids = None
self.cancelledAttendees = ()
- self.rsvps = None
+ self.reinvites = None
# Check for a delete
if self.action == "remove":
@@ -485,11 +482,11 @@
self.oldcalendar = self.resource.iCalendar()
# Significant change
- no_change, self.changed_rids, rsvps, recurrence_reschedule = self.isOrganizerChangeInsignificant()
+ no_change, self.changed_rids, reinvites, recurrence_reschedule = self.isOrganizerChangeInsignificant()
if no_change:
- if rsvps:
- log.debug("Implicit - organizer '%s' is re-inviting UID: '%s', attendees: %s" % (self.organizer, self.uid, ", ".join(rsvps)))
- self.rsvps = rsvps
+ if reinvites:
+ log.debug("Implicit - organizer '%s' is re-inviting UID: '%s', attendees: %s" % (self.organizer, self.uid, ", ".join(reinvites)))
+ self.reinvites = reinvites
else:
# Nothing to do
log.debug("Implicit - organizer '%s' is modifying UID: '%s' but change is not significant" % (self.organizer, self.uid))
@@ -504,24 +501,19 @@
elif self.action == "create":
log.debug("Implicit - organizer '%s' is creating UID: '%s'" % (self.organizer, self.uid))
- # Always set RSVP=TRUE for any NEEDS-ACTION
- for attendee in self.calendar.getAllAttendeeProperties():
- if attendee.params().get("PARTSTAT", ["NEEDS-ACTION"])[0] == "NEEDS-ACTION":
- attendee.params()["RSVP"] = ["TRUE",]
-
yield self.scheduleWithAttendees()
- # Always clear RSVP=TRUE from all attendees after scheduling
+ # Always clear SCHEDULE-FORCE-SEND from all attendees after scheduling
for attendee in self.calendar.getAllAttendeeProperties():
try:
- del attendee.params()["RSVP"]
+ del attendee.params()["SCHEDULE-FORCE-SEND"]
except KeyError:
pass
def isOrganizerChangeInsignificant(self):
rids = None
- rsvps = None
+ reinvites = None
recurrence_reschedule = False
differ = iCalDiff(self.oldcalendar, self.calendar, self.do_smart_merge)
no_change = differ.organizerDiff()
@@ -547,16 +539,16 @@
log.error("Cannot change ORGANIZER: UID:%s" % (self.uid,))
raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "valid-attendee-change")))
else:
- # Special case of RSVP added to attendees and no other change
- rsvps = set()
+ # Special case of SCHEDULE-FORCE-SEND added to attendees and no other change
+ reinvites = set()
for attendee in self.calendar.getAllAttendeeProperties():
try:
- if attendee.params()["RSVP"][0] == "TRUE":
- rsvps.add(attendee.value())
+ if attendee.params()["SCHEDULE-FORCE-SEND"][0] == "REQUEST":
+ reinvites.add(attendee.value())
except KeyError:
pass
- return no_change, rids, rsvps, recurrence_reschedule
+ return no_change, rids, reinvites, recurrence_reschedule
def findRemovedAttendees(self):
"""
@@ -707,8 +699,8 @@
if attendee in self.except_attendees:
continue
- # If RSVP only change, only send message to those Attendees
- if self.rsvps and attendee in self.rsvps:
+ # If SCHEDULE-FORCE-SEND only change, only send message to those Attendees
+ if self.reinvites and attendee in self.reinvites:
continue
itipmsg = iTipGenerator.generateAttendeeRequest(self.calendar, (attendee,), self.changed_rids)
Modified: CalendarServer/trunk/twistedcaldav/scheduling/itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/itip.py 2009-06-24 17:08:09 UTC (rev 4372)
+++ CalendarServer/trunk/twistedcaldav/scheduling/itip.py 2009-06-24 17:13:47 UTC (rev 4373)
@@ -365,14 +365,6 @@
existing_attendee.params()["SCHEDULE-STATUS"] = [reqstatus]
partstat_changed = (oldpartstat != partstat)
- if partstat == "NEEDS-ACTION":
- existing_attendee.params()["RSVP"] = ["TRUE"]
- else:
- try:
- del existing_attendee.params()["RSVP"]
- except KeyError:
- pass
-
# Handle attendee comments
if config.Scheduling.CalDAV.get("EnablePrivateComments", True):
# Look for X-CALENDARSERVER-PRIVATE-COMMENT property in iTIP component (State 1 in spec)
@@ -661,8 +653,8 @@
itip.removeXProperties(keep_properties=keep_properties)
# Property Parameters
- itip.removePropertyParameters("ATTENDEE", ("SCHEDULE-AGENT", "SCHEDULE-STATUS",))
- itip.removePropertyParameters("ORGANIZER", ("SCHEDULE-AGENT", "SCHEDULE-STATUS",))
+ itip.removePropertyParameters("ATTENDEE", ("SCHEDULE-AGENT", "SCHEDULE-STATUS", "SCHEDULE-FORCE-SEND",))
+ itip.removePropertyParameters("ORGANIZER", ("SCHEDULE-AGENT", "SCHEDULE-STATUS", "SCHEDULE-FORCE-SEND",))
class iTIPRequestStatus(object):
"""
Modified: CalendarServer/trunk/twistedcaldav/scheduling/processing.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/processing.py 2009-06-24 17:08:09 UTC (rev 4372)
+++ CalendarServer/trunk/twistedcaldav/scheduling/processing.py 2009-06-24 17:13:47 UTC (rev 4373)
@@ -653,7 +653,5 @@
if attendee.params().get("PARTSTAT", ("NEEDS-ACTION",))[0] != partstat:
attendee.params()["PARTSTAT"] = [partstat]
madeChanges = True
- if "RSVP" in attendee.params():
- del attendee.params()["RSVP"]
return madeChanges
Modified: CalendarServer/trunk/twistedcaldav/scheduling/test/test_icaldiff.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/test/test_icaldiff.py 2009-06-24 17:08:09 UTC (rev 4372)
+++ CalendarServer/trunk/twistedcaldav/scheduling/test/test_icaldiff.py 2009-06-24 17:13:47 UTC (rev 4373)
@@ -559,7 +559,7 @@
DTSTART:20080601T120000Z
DTEND:20080601T130000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
END:VCALENDAR
@@ -1756,7 +1756,7 @@
DTSTART:20080604T130000Z
DTEND:20080604T140000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=DECLINED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=DECLINED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
END:VCALENDAR
@@ -1822,7 +1822,7 @@
DTSTART:20080604T130000Z
DTEND:20080604T140000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=DECLINED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=DECLINED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
BEGIN:VEVENT
@@ -1831,7 +1831,7 @@
DTSTART:20080606T120000Z
DTEND:20080606T130000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=DECLINED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=DECLINED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
END:VCALENDAR
@@ -1886,7 +1886,7 @@
DTSTART:20080601T120000Z
DTEND:20080601T130000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=DECLINED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=DECLINED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
BEGIN:VEVENT
@@ -2546,7 +2546,7 @@
DTSTART:20080601T120000Z
DTEND:20080601T130000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
END:VCALENDAR
@@ -2591,7 +2591,7 @@
DTSTART:20080601T130000Z
DTEND:20080601T140000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
END:VCALENDAR
@@ -2672,7 +2672,7 @@
DTEND:20080602T130000Z
ORGANIZER;CN="User 01":mailto:user1 at example.com
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
END:VEVENT
END:VCALENDAR
""",
@@ -2686,7 +2686,7 @@
DTSTART:20080601T120000Z
DTEND:20080601T130000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
BEGIN:VEVENT
@@ -2695,7 +2695,7 @@
DTSTART:20080602T120000Z
DTEND:20080602T130000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
END:VCALENDAR
@@ -2758,7 +2758,7 @@
DTSTART:20080601T140000Z
DTEND:20080601T150000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
BEGIN:VEVENT
@@ -2767,7 +2767,7 @@
DTSTART:20080602T120000Z
DTEND:20080602T130000Z
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
END:VCALENDAR
@@ -2816,7 +2816,7 @@
DTEND:20080602T130000Z
ORGANIZER;CN="User 01":mailto:user1 at example.com
ATTENDEE:mailto:user1 at example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:user2 at example.com
END:VEVENT
END:VCALENDAR
""",
Modified: CalendarServer/trunk/twistedcaldav/scheduling/test/test_itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/test/test_itip.py 2009-06-24 17:08:09 UTC (rev 4372)
+++ CalendarServer/trunk/twistedcaldav/scheduling/test/test_itip.py 2009-06-24 17:13:47 UTC (rev 4373)
@@ -144,7 +144,7 @@
UID:12345-67890
DTSTART:20080601T120000Z
DTEND:20080601T130000Z
-ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;SCHEDULE-STATUS=2.0:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;SCHEDULE-STATUS=2.0:mailto:user1 at example.com
ATTENDEE:mailto:user2 at example.com
ORGANIZER;CN=User 01:mailto:user1 at example.com
END:VEVENT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090624/dc024690/attachment-0001.html>
More information about the calendarserver-changes
mailing list