Bug 158801 - all-day events imported from OpenGroupware ignored
Summary: all-day events imported from OpenGroupware ignored
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-05 14:39 UTC by Johannes Ballé
Modified: 2008-06-28 22:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
ics file to reproduce the bug (619 bytes, text/plain)
2008-03-05 14:40 UTC, Johannes Ballé
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Ballé 2008-03-05 14:39:11 UTC
Version:            (using KDE 3.5.9)
Installed from:    Ubuntu Packages

All-day events consisting of a single day are ignored entirely by Korganizer. All-day events spanning multiple days are missing the last day. Confirmed this behaviour for 3.5.5, 3.5.8 and 3.5.9. We use the "calendar in remote file" resource to import Opengroupware events. However, the same happens when saving the ics file locally and using the local file.

Attaching example file with sensitive data replaced by XXX. By changing the end date manually with a text editor, you should be able to reproduce the problem.
Comment 1 Johannes Ballé 2008-03-05 14:40:36 UTC
Created attachment 23787 [details]
ics file to reproduce the bug
Comment 2 Johannes Ballé 2008-03-05 15:33:33 UTC
You can easily test this by downloading the attachment and issuing 

korganizer -o calendar.ics
Comment 3 Johannes Ballé 2008-04-18 10:26:03 UTC
After some experimentation, I found out that the custom entry

X-MICROSOFT-CDO-ALLDAYEVENT:TRUE

is the culprit. The corresponding lines are around libkcal/icalformatimpl.cpp:1038:

----------------
  QString msade = event->nonKDECustomProperty("X-MICROSOFT-CDO-ALLDAYEVENT");
  if (!msade.isNull()) {
    bool floats = (msade == QString::fromLatin1("TRUE"));
//    kdDebug(5800) << "ICALFormat::readEvent(): all day event: " << floats << endl;
    event->setFloats(floats);
    if (floats) {
      QDateTime endDate = event->dtEnd();
      event->setDtEnd(endDate.addDays(-1));
    }
  }
----------------

committed by David Jarvie.

The code obviously moves the end date back one day, which makes one-day-appointments disappear completely.

Excellent. A proprietary "amendment" to an open standard by Microsoft causes incompatibility between two entirely open source software components ...
Comment 4 Allen Winter 2008-06-28 22:01:21 UTC
SVN commit 825608 by winterz:

Fix (hopefully, because I have no way to test) all-day events imported from OpenGroupware

David, you could double check this and let me know if it makes sense.
If so I will backport to the 3.5 branch.

BUG: 158801
CCMAIL: djarvie@kde.org


 M  +2 -6      icalformat_p.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=825608