Repository navigation
Conversation
Several servers keep a UID in one calendar only, so add-then-delete fails: CCS, Cyrus and Ox refuse the copy, and on Zimbra saving the copy moves the original, so the delete gets a 404. The move capability now carries an order from save.duplicate-uid.cross-calendar: delete-first (putting the item back if the add fails, and saying so if that fails too; never for an occurrence), or add-may-move (the copy is read back first; a 404 on the delete then means it moved the original). Where delete-first would need a deleted UID to be reused and it cannot be, move is unsupported. A stopgap until caldav has a move() using WebDAV MOVE: python-caldav/caldav#841 Prompt: File an issue at the caldav repo about adding a move() that uses WebDAV MOVE when it's supported by the server. File an issue to the caldav-server-repo (sic) project that it's needed with probes for the WebDAV MOVE and for the "copy is move"-behaviour. Make the cheaper workaround as for now. Fix the rename. There are the compatibility hints "save-load.reuse-deleted-uid" and "save.duplicate-uid.cross-calendar" to consider too. If none of them are allowed, then it's impossible to move an event. If the latter is not allowed, it's needed to first delete then insert. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Zimbra names a calendar's URL after its display name, so renaming it moves the calendar, and looking it up by its old id failed. After a rename, set_name() lists the calendars, and where the old URL is gone and one calendar has the new name, takes it and updates url and id; with several of that name it does not guess. This costs one listing per rename on every server; no hint says which servers do this. Prompt: (same as the previous commit) ... Fix the rename. ... Assisted-By: Claude Opus 5.5 <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
tobixen
added a commit
that referenced
this pull request
Oct 30, 2026
…ar, or rename a calendar's URL #42 Moving an item works where a server keeps a UID in one calendar only (CCS, Cyrus, Ox: delete first, never for an occurrence, and not at all where a deleted UID cannot be reused; Zimbra: the copy moves the original), from caldav's hints, until caldav has a move() using WebDAV MOVE. A rename that moves the calendar's URL (Zimbra) is followed. Commits: - ffc45d9 fix: move where a UID fits in one calendar only - 75db9dc fix: follow a calendar that a rename moved Assisted-By: Claude Opus 5.5 <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer: AI-generated code and text below the line, generated by Claude Opus 5.5, from the prompt(s):
Stacked on #38 (
test/caldav-testing-registry); retarget tomainonce that is merged.Moving an item between calendars and renaming a calendar failed on several CalDAV servers:
movecapability now carries an order derived from caldav'ssave.duplicate-uid.cross-calendarhint:delete-first(the item is put back if the add fails, and the error says so if that fails too; occurrences are refused), oradd-may-move(the copy is read back before the original is deleted). Where delete-first would need a deleted UID to be reused (save-load.reuse-deleted-uid) and it cannot be,moveis unsupported. This is a stopgap until caldav has amove()using WebDAV MOVE (Add move() for calendar objects, using WebDAV MOVE where the server supports it python-caldav/caldav#841; follow-up in After caldav 3.8: use caldav's move() instead of the hint-based move #41).set_name()now follows it when exactly one calendar has the new name (follow-up on the extra listing in After caldav 3.8: skip the listing after a rename where the server keeps the URL #40).Tested: the unit suite, and the move and rename scenario and conformance tests against Zimbra, Ox, Cyrus, SOGo, a second Zimbra account and Baikal. No news fragment: move and rename on CalDAV are not released yet, so this PR gets the
skip-changeloglabel.🤖 Generated with Claude Code