Bug 360781

Summary: KOrganizer doesn't import all events out of .vcs file
Product: [Applications] korganizer Reporter: wojnilowicz <lukasz.wojnilowicz>
Component: import/exportAssignee: kdepim bugs <pim-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: winter
Priority: NOR    
Version First Reported In: 4.14.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: VCS file with two problematic events
fixed vcs calendar

Description wojnilowicz 2016-03-20 17:31:20 UTC
I've got .vcs file with two events inside and only one of them gets imported into KOrganizer instead of both.

Reproducible: Always

Steps to Reproduce:
1. File->Import->Import Calendar
2. Choose events.vcs (see attachment)
3. When prompted, choose to merge events being imported with personal calendar

Actual Results:  
Only "Second event" gets imported into Personal Calendar on 02 December 2016

Expected Results:  
"First event" should get imported into  Personal Calendar on 01 December 2016
and
"Second event" should get imported into  Personal Calendar on 02 December 2016

My version of KOrganizer isn't 4.14.2 but 4.14.10.
Comment 1 wojnilowicz 2016-03-20 17:32:24 UTC
Created attachment 97992 [details]
VCS file with two problematic events
Comment 2 Allen Winter 2016-03-20 17:51:11 UTC
that isn't a valid formatted file.  you have 2 VCALENDARs in 1 file.
if fixed it for you. see my attachment.
Comment 3 Allen Winter 2016-03-20 17:51:55 UTC
Created attachment 97993 [details]
fixed vcs calendar
Comment 4 wojnilowicz 2016-03-20 18:11:36 UTC
(In reply to Allen Winter from comment #2)
> that isn't a valid formatted file.  you have 2 VCALENDARs in 1 file.
> if fixed it for you. see my attachment.

This file is legitimately file created by Nokia phone and I think it's valid formatted file. Please read
"A vCalendar data stream may include one or more vCalendar objects. An individual vCalendar object is identified within a data stream by the appearance of the Begin vCalendar Delimiter:
BEGIN:VCALENDAR[...]"

from https://www.imc.org/pdi/vcal-10.txt.
Do you think, that KOrganize shouldn't handle this case of .vcs file?
Comment 5 Allen Winter 2016-03-20 23:25:37 UTC
the vcs parsing code is ancient and no longer supported.   not sure why you're using that format.
in any event, we have no intention of going into that old code to add support for multiple VCALENDAR components in 1 file.