-
Notifications
You must be signed in to change notification settings - Fork 242
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
Import only events whose UID does not already exist #589
Comments
I would actually consider this a server-side bug in the CalDAV server, it if allows dup UIDs.
There will be a calendar / address book trash bin, so users are able to restore them. |
Ok, fine. I hope, it is a server feature?! So that the user is also able to restore the event, if it was deleted by Thunderbird or Davdroid? |
Yes, obviously :) |
(see nextcloud/server#1662) |
I would first check if such a check is done in other CalDAV servers. |
As I can see sabreDAV currently also allows to upload multiple vcfs with same UID in it. But there is also a similar issue with sabreDAV and updating the UID (/~https://github.com/fruux/sabre-dav/issues/993). Maybe there is a relation? |
Yes, Nextcloud uses Sabre/DAV ;) I think we should treat this as 2 issues:
The big question is:
I would actually vote for 1 for simplicities sake. |
I'm voting for 2. Let me explain my situation : |
Can confirm this. :-)
Instead, you should add the ICS URL as a subscription. Note that username/password will be required, in the following form : |
There is another issue with option 2: Scenario:
If you now import it, your changes will be lost. |
Trying subscriptions ;), I did not know this could be done since I didn't find any documentation... Anyway, tried it, and it solved my problem ;) ! I just put the direct link to the ics (not identification, are they serious ?) and voilà ! |
Then we would have to add versioning of calendars, because otherwise we don't know what the first version looked like. And generally saying "just implement a manage conflict dialog" is much easier than actually implementing it properly ;) |
I agree XD, but when doing things, the best is to do the best when possible ;) |
You can use https://icsdroid.bitfire.at/ for CalDAV subscriptions. |
Unfortunately, ICSDroid isn't free, so I can't share it to anyone... legally. |
Despite being paid on various android stores, its open source and available via fDroid. |
Oops, my bad ! They don't advertise that ;) |
Today I found another (important) use case for this. We want to migrate from another groupware solution to Nextcloud: The migration can be the easiest way for users to export and import their calendars themselves. But as soon as two users are in the same meeting, one of the both users will get the appointment twice: |
It also depends on the order if organizer or participant imports his calendar first. Reproduce above described behavior following:
When user B imports his calendar before user A, it will not created a second event neither in user A nor in user B calendar). |
Pull request in #667 |
Steps to reproduce
Expected behaviour
It will be only imported events, whose UID does not already exist in calender for the user.
Actual behaviour
Every event is imported regardless if it already exist or not. Therefore it exists events with the same UID in the same calender, which is not allowed by CalDAV specification: https://tools.ietf.org/html/rfc4791.
I already found #53, which was closed earlier this year. However I confirm that it makes no sense to import already existing events. Therefore I would not ask the user about replacing / adding the event. Instead, the item to be imported should be ignored if another one already exists with the same UID in the calendar.
Independent of the CalDAV specification, here is an use case:
User deletes an event and needs to restore a backup. The backup does not contain all events of the current calendar but the event, which was deleted by accident. Therefore I cannot delete the whole calendar (because I would delete events, which are not in the backup), but I also cannot import the ics because of the duplicated events.
The text was updated successfully, but these errors were encountered: