fix(caldav): add default calendar fallback for tasks without calendar tag#1260
Open
pentux-GitHub wants to merge 2 commits intogetting-things-gnome:masterfrom
Open
fix(caldav): add default calendar fallback for tasks without calendar tag#1260pentux-GitHub wants to merge 2 commits intogetting-things-gnome:masterfrom
pentux-GitHub wants to merge 2 commits intogetting-things-gnome:masterfrom
Conversation
… 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.
Contributor
|
LGTM and sounds like a good solution but it looks like this isn't exposed to the UI? |
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.
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-calendarparameter so users can settheir preferred default calendar name, instead of relying on a
hardcoded value. Defaults to 'gtg' for backward compatibility.
Tested on