Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTG allows creating multiple backends of type CalDAV, but they do not persist across restarts #930

Open
cpitclaudel opened this issue Sep 19, 2022 · 0 comments · May be fixed by #931
Open
Assignees
Labels
enhancement plugins Plugins and extra backends

Comments

@cpitclaudel
Copy link

The UI allows creating multiple CalDAV backends (and optionally giving them different, custom names), and they seem to work OK, but exiting and reopening GTG loses all but one backend of each kind.

The cause seems to be that the config file backends.conf has a single section per backend kind (i.e. one for backend_localfile and one for backend_caldav).

Maybe it would be enough to use backend IDs instead of backend names in backends.conf.

cpitclaudel added a commit to cpitclaudel/gtg that referenced this issue Sep 19, 2022
This allows GTG to have multiple backends of one kind at the same time.

* GTG/backends/__init__.py (BackendFactory.get_saved_backends_list): Rename
`backend` to `backend_id` for clarity.  Call `config.rename_backend_section` on
each backend for compatibility with previous versions of GTG.
* GTG/core/config.py (CoreConfig_.rename_backend_section): New function to
rename a config section (from backend name to backend ID).
(CoreConfig_.get_all_backends): Rename `backend` to `backend_id` for clarity.
* GTG/core/datastore.py (DataStore.save): Retrieve config section by backend id,
not by backend name.

Fixes getting-things-gnome#930.
@cpitclaudel cpitclaudel linked a pull request Sep 19, 2022 that will close this issue
@nekohayo nekohayo added enhancement plugins Plugins and extra backends labels Jan 7, 2023
cpitclaudel added a commit to cpitclaudel/gtg that referenced this issue Mar 2, 2024
This allows GTG to have multiple backends of one kind at the same time.

* GTG/backends/__init__.py (BackendFactory.get_saved_backends_list): Rename
`backend` to `backend_id` for clarity.  Call `config.rename_backend_section` on
each backend for compatibility with previous versions of GTG.
* GTG/core/config.py (CoreConfig_.rename_backend_section): New function to
rename a config section (from backend name to backend ID).
(CoreConfig_.get_all_backends): Rename `backend` to `backend_id` for clarity.

Fixes getting-things-gnome#930.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement plugins Plugins and extra backends
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants