[CalendarServer-changes] [14479] CalendarServer/branches/users/sagen/trashcan-5/txdav
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 27 10:28:02 PST 2015
Revision: 14479
http://trac.calendarserver.org//changeset/14479
Author: sagen at apple.com
Date: 2015-02-27 10:28:02 -0800 (Fri, 27 Feb 2015)
Log Message:
-----------
Attendee with a fully-declined-and-trashed event will not get an update if the organizer makes an unimportant change
Modified Paths:
--------------
CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/scheduling/processing.py
CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/test/test_sql.py
Modified: CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/scheduling/processing.py
===================================================================
--- CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/scheduling/processing.py 2015-02-27 01:40:13 UTC (rev 14478)
+++ CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/scheduling/processing.py 2015-02-27 18:28:02 UTC (rev 14479)
@@ -520,17 +520,12 @@
# Only move from trash if attendee is not fully declined:
isTrash = yield self.recipient_calendar_resource.isTrash()
- print("XYZZY is trash?", self.recipient_calendar_resource, self.recipient_calendar_resource._parentCollection, isTrash)
if isTrash:
- print("XYZZY MESSAGE", self.message)
attendees = self.message.getAttendeeProperties((self.recipient.cuaddr,))
- print("ATTENDEES", attendees, attendees[0].parameterValue("PARTSTAT", "blah"))
if not all([attendee.parameterValue("PARTSTAT", "NEEDS-ACTION") == "DECLINED" for attendee in attendees]):
- print("XYZZY fromTrash start", self.recipient_calendar_resource)
yield self.recipient_calendar_resource.fromTrash()
- print("XYZZY fromTrash end", self.recipient_calendar_resource)
else:
- print("ATTENDEE IS FULLY DECLINED")
+ store_inbox = False
new_resource = (yield self.writeCalendarResource(None, self.recipient_calendar_resource, new_calendar))
Modified: CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/test/test_sql.py
===================================================================
--- CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/test/test_sql.py 2015-02-27 01:40:13 UTC (rev 14478)
+++ CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/test/test_sql.py 2015-02-27 18:28:02 UTC (rev 14479)
@@ -967,7 +967,7 @@
SUMMARY:Scheduled
ORGANIZER;CN="User 01":mailto:user01 at example.com
ATTENDEE:mailto:user01 at example.com
-ATTENDEE:mailto:user02 at example.com
+ATTENDEE;PARTSTAT=DECLINED:mailto:user02 at example.com
END:VEVENT
END:VCALENDAR
""" % subs
@@ -983,7 +983,7 @@
SUMMARY:CHANGED!
ORGANIZER;CN="User 01":mailto:user01 at example.com
ATTENDEE:mailto:user01 at example.com
-ATTENDEE:mailto:user02 at example.com
+ATTENDEE;PARTSTAT=DECLINED:mailto:user02 at example.com
END:VEVENT
END:VCALENDAR
""" % subs
@@ -1100,7 +1100,7 @@
self.assertEqual(len(resourceNames), 1)
data = yield self._getResourceData(txn, "user02", "calendar", "")
- self.assertTrue("EMAIL=user02 at example.com;RSVP=TRUE" in data)
+ self.assertTrue("PARTSTAT=NEEDS-ACTION" in data)
resource = yield self._getResource(txn, "user01", "inbox", "")
yield resource.remove()
@@ -1138,6 +1138,8 @@
self.assertTrue("PARTSTAT=DECLINED" in data)
resource = yield self._getResource(txn, "user01", "inbox", "")
yield resource.remove()
+ resource = yield self._getResource(txn, "user02", "inbox", "")
+ yield resource.remove()
yield txn.commit()
yield JobItem.waitEmpty(self.store.newTransaction, reactor, 60)
@@ -1145,7 +1147,6 @@
# user01 makes a SUMMARY change to event while user02's copy is in the trash
txn = self.store.newTransaction()
- print("USER CHANGING SUMMARY")
yield self._updateResource(txn, "user01", "calendar", "test.ics", data4)
yield txn.commit()
@@ -1167,10 +1168,6 @@
resourceNames = yield self._getResourceNames(txn, "user02", "inbox")
self.assertEqual(len(resourceNames), 0)
- data = yield self._getResourceData(txn, "user02", "trash", "")
- print("User02 trash copy", data)
- # self.assertTrue("EMAIL=user02 at example.com;RSVP=TRUE" in data)
-
yield txn.commit()
# FIXME: we should have a test where after the attendee's copy is trashed, it is fully removed, then have the organizer make a SUMMARY change, then a time change
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150227/ea05ad72/attachment.html>
More information about the calendarserver-changes
mailing list