[PR #2389] [MERGED] fix: preserve CalDAV inverse relations when parent has no RELATED-TO #8232

Closed
opened 2026-04-20 18:06:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2389
Author: @tink-bot
Created: 3/10/2026
Status: Merged
Merged: 3/11/2026
Merged by: @kolaente

Base: mainHead: fix/caldav-subtask-relations


📝 Commits (3)

  • 1263563 test: add failing tests for CalDAV parent without RELATED-TO
  • b75e6ce fix: only remove CalDAV relations of explicitly-declared kinds
  • 5cbd9bf test: use db.AssertExists for CalDAV relation assertions

📊 Changes

2 files changed (+272 additions, -0 deletions)

View changed files

📝 pkg/routes/caldav/listStorageProvider.go (+19 -0)
📝 pkg/webtests/caldav_test.go (+253 -0)

📄 Description

Summary

  • Fixes removeStaleRelations in CalDAV storage provider to only remove relations of kinds explicitly declared in the incoming VTODO's RELATED-TO properties
  • When a VTODO has no RELATED-TO at all (e.g., a parent task from Tasks.org), no relations are removed — they were auto-created as inverses by child tasks
  • When a VTODO declares specific relation kinds (e.g., RELATED-TO;RELTYPE=PARENT), only relations of that kind are checked for staleness; other kinds (like auto-created subtask inverses) are preserved

Fixes #2383


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2389 **Author:** [@tink-bot](https://github.com/tink-bot) **Created:** 3/10/2026 **Status:** ✅ Merged **Merged:** 3/11/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix/caldav-subtask-relations` --- ### 📝 Commits (3) - [`1263563`](https://github.com/go-vikunja/vikunja/commit/126356347c9a8cada3d88e0addabf3f9a23c660b) test: add failing tests for CalDAV parent without RELATED-TO - [`b75e6ce`](https://github.com/go-vikunja/vikunja/commit/b75e6ce671eccc0685fe8fca72dfac11f1a85600) fix: only remove CalDAV relations of explicitly-declared kinds - [`5cbd9bf`](https://github.com/go-vikunja/vikunja/commit/5cbd9bf201bfec41c76a6340907e311c78003647) test: use db.AssertExists for CalDAV relation assertions ### 📊 Changes **2 files changed** (+272 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `pkg/routes/caldav/listStorageProvider.go` (+19 -0) 📝 `pkg/webtests/caldav_test.go` (+253 -0) </details> ### 📄 Description ## Summary - Fixes `removeStaleRelations` in CalDAV storage provider to only remove relations of kinds explicitly declared in the incoming VTODO's `RELATED-TO` properties - When a VTODO has no `RELATED-TO` at all (e.g., a parent task from Tasks.org), no relations are removed — they were auto-created as inverses by child tasks - When a VTODO declares specific relation kinds (e.g., `RELATED-TO;RELTYPE=PARENT`), only relations of that kind are checked for staleness; other kinds (like auto-created `subtask` inverses) are preserved Fixes #2383 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 18:06:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#8232