Skip to content

fix(caldav): add default calendar fallback for tasks without calendar tag#1260

Open
pentux-GitHub wants to merge 2 commits intogetting-things-gnome:masterfrom
pentux-GitHub:fix/caldav-default-calendar
Open

fix(caldav): add default calendar fallback for tasks without calendar tag#1260
pentux-GitHub wants to merge 2 commits intogetting-things-gnome:masterfrom
pentux-GitHub:fix/caldav-default-calendar

Conversation

@pentux-GitHub
Copy link
Copy Markdown

@pentux-GitHub pentux-GitHub commented Feb 21, 2026

Problem

When a task has no calendar tag (@DAV_name) and no calendar_name
attribute, GTG silently skips synchronization with the message
"has no calendar to be synced with".

This affects all new users who set up CalDAV sync without knowing
they need to manually tag every task with @DAV_<calendar_name>.

Solution

Add a fallback in _get_todo_and_calendar() that uses a calendar
named 'gtg' by default, or the first available calendar if none
is named 'gtg'.

Update

Added a configurable default-calendar parameter so users can set
their preferred default calendar name, instead of relying on a
hardcoded value. Defaults to 'gtg' for backward compatibility.

Tested on

  • GTG 0.6.0 / Debian 13
  • Nextcloud CalDAV
  • Synced with Tasks.org on Fairphone 4 (e/OS)

… tag

When a task has no calendar tag (@DAV_name) and no calendar attribute,
GTG was silently skipping synchronization. This patch adds a fallback
that uses a calendar named 'gtg' by default, or the first available
calendar if none is named 'gtg'.

Fixes: tasks not syncing when no @DAV_ tag is present.
Add a 'default-calendar' parameter to the CalDAV backend so users
can configure which calendar receives tasks that have no @DAV_ tag.
Defaults to 'gtg' for backward compatibility.
@diegogangl
Copy link
Copy Markdown
Contributor

LGTM and sounds like a good solution but it looks like this isn't exposed to the UI?
(also, sorry for the delay!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants