nextcloud / nextcloud/server

[Bug]: Importing an event is not possible if an event with the same UID exists in the trash

Open
#53,262 3 comments 0 reactions 0 assignees View on GitHub

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
  1. Import a calendar event into the calendar.
  2. Delete the event.
  3. Verify that the event is in the trash bin.
  4. Attempt to import the same .ics file again.
  5. 💥
Expected behavior

No error ;)

Nextcloud Server version

master

Additional info

Possible fixes:

  1. Extend the index to include the deleted_at column.
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.