Bug 339726 - KOrganizer wrongly states: import of .ics file without UIDs succeded.
Summary: KOrganizer wrongly states: import of .ics file without UIDs succeded.
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: import/export (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 411777 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-06 11:00 UTC by Lukas Schneiderbauer
Modified: 2022-04-11 22:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
calendar file which is not correctly imported by korganizer (1.48 KB, text/calendar)
2014-10-06 11:01 UTC, Lukas Schneiderbauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Schneiderbauer 2014-10-06 11:00:49 UTC
First, I'm using KOrganizer 4.14.1 (which was not available to select in the version-field).

I'm trying to import an ics file by clicking on the file (in dolphin).
Then KOrganizer asks me if I want to Create a new calendar or merge into an existing one. I select the latter.
Then KOrganizer confirms: "1 incidence was imported successfully" (which is weird, because the file contains more than 1 event.)
But no events are shown in my calendar.

I cannot find any faults in the ics file. See the following attachment.

Reproducible: Always




This is independent of the chosen calendar source (be it a google calendar, dav calendar or a local one). Even the "ics-calendar" does not work.
Comment 1 Lukas Schneiderbauer 2014-10-06 11:01:32 UTC
Created attachment 88995 [details]
calendar file which is not correctly imported by korganizer
Comment 2 Lukas Schneiderbauer 2014-10-06 12:29:35 UTC
I found out that the UID property is required (if one can believe http://www.kanzaki.com/docs/ical/uid.html).

I also found out (through akonadiconsole) that the events are actually added (but then not shown in korganizer).
Also the added faulty event keep the dav-resource from syncing I think due to this:
[.xsession-errors]
kdepimlibs (kcalcore) KCalCore::ICalFormatImpl::Private::readIncidenceBase: The incidence didn't have any UID! Report a bug  to the application that generated this file.

After removing the faulty events with akonadiconsole the syncing process began working again.

So I think the importer should either state that importing is not possible or generate a uid-field itself. I would prefer the latter.
Comment 3 Russell Hedger 2014-10-28 09:31:05 UTC
I can confirm experiencing this bug in Korganizer 4.14.1. Attempting to import an iCalendar file missing the UID property fails, although Korganizer prompts that the import was successful. Manually editing the file to include a UID leads to successful import.

Given that generation of iCalendar files missing the UID property is not uncommon, gracefully handling this situation by allowing successful import would be helpful.
Comment 4 ludo444 2017-06-07 04:30:35 UTC
This still happens in KDE neon 16.04. Especially with remote calendars.
Comment 5 gjditchfield 2022-04-08 16:00:50 UTC
*** Bug 411777 has been marked as a duplicate of this bug. ***
Comment 6 gjditchfield 2022-04-11 22:21:14 UTC
Git commit 770ece2db6218fba373fbd84d3ef39a3a29c9edf by Glen Ditchfield.
Committed on 11/04/2022 at 22:21.
Pushed by gditchfield into branch 'master'.

Create UIDs if necessary

If `ICalFormat::fromRawString()` processes a component that lacks a
UID property, it creates an instance with an invalid UID, which
violates RFC 5545.

This patch generates a UID from the component's property values, which
will be the same every time it is processed.

M  +114  -0    autotests/testicalformat.cpp
M  +3    -0    autotests/testicalformat.h
M  +17   -3    src/icalformat_p.cpp

https://invent.kde.org/frameworks/kcalendarcore/commit/770ece2db6218fba373fbd84d3ef39a3a29c9edf