[CalendarServer-changes] [8423] CalendarServer/branches/release/CalendarServer-3.2-dev

source_changes at macosforge.org source_changes at macosforge.org
Sun Dec 11 14:01:29 PST 2011


Revision: 8423
          http://trac.macosforge.org/projects/calendarserver/changeset/8423
Author:   cdaboo at apple.com
Date:     2011-12-11 14:01:28 -0800 (Sun, 11 Dec 2011)
Log Message:
-----------
Restore proper iTIP cancel sequence behavior.

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/itip.py
    CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/test/test_itip.py

Property Changed:
----------------
    CalendarServer/branches/release/CalendarServer-3.2-dev/


Property changes on: CalendarServer/branches/release/CalendarServer-3.2-dev
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:8290,8294,8303,8305,8307,8314,8320,8331
   + /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:8290,8294,8303,8305,8307,8314,8320,8331,8422

Modified: CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/itip.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/itip.py	2011-12-11 21:49:51 UTC (rev 8422)
+++ CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/itip.py	2011-12-11 22:01:28 UTC (rev 8423)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2006-2009 Apple Inc. All rights reserved.
+# Copyright (c) 2006-2011 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -608,7 +608,9 @@
     @staticmethod
     def generateCancel(original, attendees, instances=None, full_cancel=False):
         """
-        This assumes that SEQUENCE is already at its new value in the original calendar data.
+        This assumes that SEQUENCE is not already at its new value in the original calendar data. This
+        is because the component passed in is the one that originally contained the attendee that is
+        being removed. 
         """
         
         itip = Component("VCALENDAR")
@@ -637,7 +639,9 @@
             # Add some required properties extracted from the original
             comp.addProperty(Property("DTSTAMP", instance.propertyValue("DTSTAMP")))
             comp.addProperty(Property("UID", instance.propertyValue("UID")))
-            comp.addProperty(Property("SEQUENCE", instance.propertyValue("SEQUENCE") if instance.hasProperty("SEQUENCE") else 0))
+            seq = instance.propertyValue("SEQUENCE")
+            seq = int(seq) + 1 if seq else 1
+            comp.addProperty(Property("SEQUENCE", seq))
             comp.addProperty(instance.getOrganizerProperty())
             if instance_rid:
                 comp.addProperty(Property("RECURRENCE-ID", instance_rid.duplicate().adjustToUTC()))

Modified: CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/test/test_itip.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/test/test_itip.py	2011-12-11 21:49:51 UTC (rev 8422)
+++ CalendarServer/branches/release/CalendarServer-3.2-dev/twistedcaldav/scheduling/test/test_itip.py	2011-12-11 22:01:28 UTC (rev 8423)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2005-2007 Apple Inc. All rights reserved.
+# Copyright (c) 2005-2011 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -1739,7 +1739,7 @@
 DTSTART:20071114T000000Z
 ATTENDEE:mailto:user2 at example.com
 ORGANIZER:mailto:user1 at example.com
-SEQUENCE:1
+SEQUENCE:2
 END:VEVENT
 END:VCALENDAR
 """,
@@ -1772,7 +1772,7 @@
 ATTENDEE:mailto:user3 at example.com
 ATTENDEE:mailto:user2 at example.com
 ORGANIZER:mailto:user1 at example.com
-SEQUENCE:2
+SEQUENCE:3
 END:VEVENT
 END:VCALENDAR
 """,
@@ -1805,7 +1805,7 @@
 DTSTART:20081114T000000Z
 ATTENDEE:mailto:user2 at example.com
 ORGANIZER:mailto:user1 at example.com
-SEQUENCE:1
+SEQUENCE:2
 END:VEVENT
 END:VCALENDAR
 """,
@@ -1846,7 +1846,7 @@
 DTSTART:20081114T010000Z
 ATTENDEE:mailto:user2 at example.com
 ORGANIZER:mailto:user1 at example.com
-SEQUENCE:1
+SEQUENCE:2
 END:VEVENT
 END:VCALENDAR
 """,
@@ -1887,7 +1887,7 @@
 ATTENDEE:mailto:user2 at example.com
 ORGANIZER:mailto:user1 at example.com
 RRULE:FREQ=YEARLY
-SEQUENCE:1
+SEQUENCE:2
 END:VEVENT
 END:VCALENDAR
 """,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111211/b0445376/attachment-0001.html>


More information about the calendarserver-changes mailing list