-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Calendar and Contacts Trashbin #1662
Comments
There are a few questions that need a prior discussion:
I'd not like to see it in the latter, because you can use CalDAV and CardDAV without the Calendar and Contacts app. Therefore the trash bin should always work, no matter whether the web gui is enabled.
I'd actually go with calendar and contacts here. We can't do this with plain CalDAV/CardDAV. Therefore it's acceptable to having enable I'd suggest to provide the trash bin via @schiessle I wasn't able to find the trash bin via |
Yes, but there are the following scenarios: Dav app takes care: Calendar app takes care: |
Totally agree with all of these. If I understand correctly, putting an item in the bin would mean moving the data from the |
Couldn't we just create a flag, and some sort of hidden calendars/events which are not exposed, unless you propfind with a the special property? I think that would be very few lines to implement. When you delete a calendar/event and it does not have the flag yet, we set the flag. If the flag already exists it's deleted from the system. |
That would indeed be a good solution. |
But there is actually one issues I'd like to discuss before implementing this: When a calendar/addressbook (but also event/contact) is deleted, the uid should be available again. Keep this random string when replacing or tell the client to send a new uid along the request? The |
Reminder for myself: |
As long as there are no duplicates on restoring, fine by me. |
Yes, the db won't allow duplicate URIs. |
Regarding where to store it – definitely directly in the Calendar respectively the Contacts app. cc @Henni @irgendwie |
Do you mean store or restore? Please excuse my brevity and typos.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The caldav part is done. Starting with Nextcloud 22 deletions of events and whole calendars result in a move into a trash bin instead of an instant and irreversible data deletion. This works with any connected client. Nextcloud Calendar then comes with a UI to restore from this trash bin. Until there is a standard for trash bins on caldav this trash bin won't be usable for connected clients. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thank you for the trash bin :) Is there an option to change the default 30 days of keeping the trash? |
Yes, Will add it to the docs nextcloud/documentation#7696 |
I just tried this configuration and set the value to 365. Reply:
Ok. But now when I go to the trash bin in the web frontend, under all entries it says:
Is this just a bug in the UI? I can wait until tomorrow to tell you if all entries are deleted or not :) |
The value needs to be set in seconds. I assume you want to set it to 365 days, so you need to put 365*24*60*60 which equals |
Is there any way to completely disable this feature? Unfortunately, it breaks things. Besides even side-effects within Nextcloud itself (as reported in Tasks Issue 1685 or Calendar Issue 3325), it also breaks a custom calendar sync tool we use. It generates events with computed UIDs to properly sync them to an external source, and might remove an event temporarily, but later has to re-add it. (I strongly suggest that adding an event which is in the trash bin should not cause a conflict, but recover the event from the trash bin - but I'll add a separate request for that.) I tried setting the Any solutions? Do I really have to adjust my sync tool? But how to deal with other CalDAV clients which perform similar operations, like moving a calendar entry from one calendar to another and back using an CalDAV client - it will also try to recreate a "deleted" calendar entry with the same UID, I'd assume... Sidenode: The calendar sync tool uses a role user account which has write access to calendars belonging to other users, where it syns the stuff to. The deleted calendars end up in the trash bin's of the users to whom the calendar belongs, not in the trash bin of the role account who actually deleted the event... Is this intended? |
=> #30096 |
Set it to |
Ahh - I understood your comment above incorrectly. I somehow read it as "0 disables trashbin expiration completely" while what you meant was "0 disables trashbin completely". Ok, thanks, I'll try that! |
Thank you for this. This update broke my synchronization with iCal Import/Export. I use it to copy an external calendar to a nextcloud calendar then sync the changes on a regular basis. Immediately after the update I started getting errors that an event's uuid existed in the trash. |
Great PR, is it being discarded now? |
Is the carddav trashbin feature tracked in a separate issue that is not yet linked here by accident? |
I was just recently made another victim of an errant DAV client trying to helpfully "sync" old data which, between it and Nextcloud, seemed to mean deleting newer contact data. Unfortunately it looks like I'm going to be spending the afternoon learning how to recover from a mysql database. Would be very helpful if DAV changes are at least logged, and deletions are captured in this recycle bin feature we've been discussing here. |
We already provide a trash bin for files, that allows users to restore deleted files.
I'd like to see something similar for calendars and contacts.
This also helps users who accidentally deleted events/contacts or an entire calendar/addressbook in their client.
Todo
cc @jancborchardt @tcitworld @schiessle
The text was updated successfully, but these errors were encountered: