[Bug]: Importing an event is not possible if an event with the same UID exists in the trash
Open
Nobody has claimed this yet.
1. to develop
32-feedback
bug
feature: caldav
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Bug description
Importing an .ics file is not possible if an event with the same UID exists in the calendar trash bin. This issue is a regression from pull request #51924, caused by the unique index across calendarid, calendartype, and uid.
Steps to reproduce
- Import a calendar event into the calendar.
- Delete the event.
- Verify that the event is in the trash bin.
- Attempt to import the same .ics file again.
- 💥
Expected behavior
No error ;)
Nextcloud Server version
master
Additional info
Possible fixes:
- Extend the index to include the deleted_at column.
- Revert the calendar export changes and replace them with a simpler version for now (see discussion https://github.com/nextcloud/server/pull/51925#discussion_r2100835407).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading pull request #51924 and the linked discussion in pull request #51925 to understand the regression and the unique index across calendarid, calendartype, and uid. Reproduce the five listed steps with an .ics event; done means importing the event succeeds after the original event is moved to the trash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100