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

When a calendar event is deleted, corresponding calendar_invitation entries are not deleted #12387

Closed
brad2014 opened this issue Nov 10, 2018 · 6 comments · Fixed by #47832
Closed
Assignees
Labels
3. to review Waiting for reviews 25-feedback bug feature: caldav Related to CalDAV internals

Comments

@brad2014
Copy link
Contributor

brad2014 commented Nov 10, 2018

A note for minor cleanup.

When a calendarobject (a particular event) is deleted, any outstanding calendar_invitations for that event should be deleted as well. Currently, I believe they are left dangling until they expire at the end time of the (now deleted) event, if the event has one.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #4451 ("Delete Calendar" Issue), #11305 (Deleting contacts not necessarily delets birthday-entries in birthday calendar), #10864 (Automatically delete old calendar events), #1506 (Birthday events created while importing contacts should be deleted if addressbook containing the corresponding contact is deleted), and #11395 (Deleting an addressbook does not seem to delete its birthday calendar entries).

@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of enhancement labels Sep 14, 2019
@georgehrke georgehrke added this to the Nextcloud 18 milestone Sep 14, 2019
@rullzer rullzer removed this from the Nextcloud 18 milestone Dec 9, 2019
@tcitworld tcitworld added bug and removed enhancement labels Jun 23, 2021
@tcitworld
Copy link
Member

So calendar_invitations reference calendarobjects (though UID) but not calendars. Therefore we can remove them when the event is (permanently) deleted, but not when the calendar itself is (permanently) deleted.

I'm not certain that it's a good idea to reference the calendar in calendar_invitations, so maybe another cleanup job?

@tcitworld tcitworld added the feature: caldav Related to CalDAV internals label Dec 17, 2021
@szaimen
Copy link
Contributor

szaimen commented Jan 9, 2023

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 9, 2023
@brad2014
Copy link
Contributor Author

brad2014 commented Jan 9, 2023

Still a bug.

I can confirm that in 25.0.2, when a calendar event is deleted, the calendar event now is moved to a trash bin (so the event object is not deleted, and the token does not refer to a deleted event uid). However, when the calendar trash is emptied, and the deleted calendar object is removed from the database, the calendar_invitation referring to that calendar object is not cleaned up, and is left dangling (its uid now refers to a nonexistant id).

Site Note: installations that have occ config:app:set dav invitation_link_recipients --value no are not affected, since invitation tokens are not generated for such systems.

@tcitworld tcitworld added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Jan 9, 2023
@SebastianKrupinski
Copy link
Contributor

SebastianKrupinski commented Jul 17, 2024

Tested on version 30-dev. Confirmed.

Tested with internal NC attendee:
On event delete,
- More options link still works.
- Accept/Decline link shows error message.
On event restore.
- More options link still works.
- Accept/Decline link still works.
On trash empty
- Same behavior as delete and link is NOT removed.

Tested with external attendee only:
On event delete,
- More options link still works.
- Accept/Decline link shows error message.
On event restore.
- More options link still works.
- Accept/Decline link still works.
On trash empty
- Same behavior as delete and link is NOT removed.

Issue 1:
calendar_invitations entries are not deleted, at any stage.

Issue 2:
More options should show error message or notification message that the event no longer exists.

Solution 1:
Delete link on event delete and check if link is still valid and show appropriate message, then generate new link on restore.

Solution 2:
Delete link on trash empty but check event status, and show appropriate message.

@SebastianKrupinski
Copy link
Contributor

Related to nextcloud/calendar#6568

@SebastianKrupinski SebastianKrupinski moved this from 📄 To do to 🏗️ In progress in 💌 📅 👥 Groupware team Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews 25-feedback bug feature: caldav Related to CalDAV internals
Projects
Development

Successfully merging a pull request may close this issue.

7 participants