Summary: | incorrect event recurrance when even spans multiple days | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Rance Hall <rance_hall> |
Component: | otherviews | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexzzman, auspex, christian, christophe, damir, finex, folken, greg.martyn, harlanb, heiko, jmmv, jwclark, kde-bugs, kde, metro_guy01, muell, raniz, silje, smartins, steve.jones, thomas, tuju, ulger, wenkbuell, wiltshi |
Priority: | NOR | Keywords: | triaged |
Version: | 2.2.1 | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Rance Hall
2002-05-21 20:15:05 UTC
KOrganizer apparently doesn't handle 12 pm as end date correctly. *** This bug has been marked as a duplicate of 34479 *** Recurring multi-day events aren't shown in the agenda view. Shall we just disable the recurrence checkbox in the event editor if the start date != end date of the event? This would at least remove the confusion from the user who expects to see the recurrences in the calendar. We would of course also need to add a comment somewhere that only one-day events can recur, but not events spanning multiple days. Reinhold This would be ok as a workaround if we aren't able to fix the bug before the release, but of course it would be much more preferable to actually fix this bug. Subject: Re: incorrect event recurrance when even spans multiple days I don't think we can fix the bug that easy (to make it for KDE 3.2), as several places in korganizer's code have a structure like: if (event->doesRecur()) { // treat recurring items here, assumes they are only one-day events // display date is not start/end date as stored in event } else { if (event->isMultiDay()) { // treat multi-day items, assume they don't recur // i.e. really use the dates stored in the event. } else { // treat all single-day, non-recurring events here } } All such code needs to be rewritten, and that is not feasible before the release. Reinhold -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/bvBOTqjEwhXvPN0RAnQMAKCRI9jY24IKVPukI3qpoMbRUV44yACfQTxg GGqrVDQsnGAzM2BCPxU+cGE= =kMW5 -----END PGP SIGNATURE----- *** Bug 72770 has been marked as a duplicate of this bug. *** *** Bug 87153 has been marked as a duplicate of this bug. *** *** Bug 89992 has been marked as a duplicate of this bug. *** I think your definition of isMultiDay is incorrect. Would you say the range of real numbers from -1 to 0 enters the positive numbers? No. 0 is not positive. Midnight is not the next day. After midnight is the next day. I haven't seen the code, but this feels like a < versus <= problem. On Sunday 17 October 2004 04:58, Brian wrote: > ------- Additional Comments From brian_252 yahoo com 2004-10-17 04:58 > ------- I think your definition of isMultiDay is incorrect. Would you say > the range of real numbers from -1 to 0 enters the positive numbers? No. 0 > is not positive. But it's non-negative. Think of the negative numbers as the previous day. Clearly 0 is not contained therein. > Midnight is not the next day. It is by definition: 12 am on the next day > After midnight is the next day. > I haven't seen the code, but this feels like a < versus <= problem. Yes, I know this. RFC 2445 (the iCalendar specification) even says that end-times are non-inclusive, so of course these events are one one-day events, not multi-day events. I just haven't found the place in the code yet where one needs to change this. However, the problem of multi-day recurring events not being displayed is a more general problem... Reinhold *** Bug 93706 has been marked as a duplicate of this bug. *** *** Bug 95918 has been marked as a duplicate of this bug. *** *** Bug 106400 has been marked as a duplicate of this bug. *** *** Bug 109763 has been marked as a duplicate of this bug. *** SVN commit 440434 by kainhofe: Use the new methods in the Incidence class to obtain the list of start times for all occurrences that overlap with the given day. This makes printing multi-day recurring events possible. They are not yet correctly shown in the Agenda, though. CCBUG: 42899 M +16 -27 calprinthelper.cpp --- branches/KDE/3.5/kdepim/korganizer/printing/calprinthelper.cpp #440433:440434 @@ -64,8 +64,8 @@ class PrintCellItem : public KOrg::CellItem { public: - PrintCellItem( Event *event, const QDate &day ) - : mEvent( event ), mDay( day ) + PrintCellItem( Event *event, const QDateTime &start, const QDateTime &end ) + : mEvent( event ), mStart( start), mEnd( end ) { } @@ -73,25 +73,15 @@ QString label() const { return mEvent->summary(); } + QDateTime start() const { return mStart; } + QDateTime end() const { return mEnd; } + + /** Calculate the start and end date/time of the recurrence that + happens on the given day */ bool overlaps( KOrg::CellItem *o ) const { PrintCellItem *other = static_cast<PrintCellItem *>( o ); - QDateTime start = event()->dtStart(); - QDateTime end = event()->dtEnd(); -// FIXME: This breaks with recurring multi-day events! - if ( event()->doesRecur() ) { - start.setDate( mDay ); - end.setDate( mDay ); - } - QDateTime otherStart = other->event()->dtStart(); - QDateTime otherEnd = other->event()->dtEnd(); -// FIXME: This breaks with recurring multi-day events! - if ( other->event()->doesRecur() ) { - otherStart.setDate( mDay ); - otherEnd.setDate( mDay ); - } - #if 0 kdDebug(5850) << "PrintCellItem::overlaps() " << event()->summary() << " <-> " << other->event()->summary() << endl; @@ -101,12 +91,12 @@ kdDebug(5850) << " otherEnd : " << otherEnd.toString() << endl; #endif - return !( otherStart >= end || otherEnd <= start ); + return !( other->start() >= end() || other->end() <= start() ); } private: Event *mEvent; - QDate mDay; + QDateTime mStart, mEnd; }; CalPrintHelper::CalPrintHelper( KPrinter *pr, Calendar *cal, KConfig *cfg, @@ -480,7 +470,11 @@ Event::List::ConstIterator itEvents; for( itEvents = events.begin(); itEvents != events.end(); ++itEvents ) { - cells.append( new PrintCellItem( *itEvents, qd ) ); + QValueList<QDateTime> times = (*itEvents)->startDateTimesForDate( qd ); + for ( QValueList<QDateTime>::ConstIterator it = times.begin(); + it != times.end(); ++it ) { + cells.append( new PrintCellItem( *itEvents, (*it), (*itEvents)->endDateForStart( *it ) ) ); + } } QPtrListIterator<KOrg::CellItem> it1( cells ); @@ -525,13 +519,8 @@ if ( mUseColors ) setCategoryColors( p, event ); // start/end of print area for event - QDateTime startTime = event->dtStart(); - QDateTime endTime = event->dtEnd(); -// FIXME: This breaks with recurring multi-day events! - if ( event->doesRecur() ) { - startTime.setDate( qd ); - endTime.setDate( qd ); - } + QDateTime startTime = item->start(); + QDateTime endTime = item->end(); if ( ( startTime < endPrintDate && endTime > startPrintDate ) || ( endTime > startPrintDate && startTime < endPrintDate ) ) { if ( startTime < startPrintDate ) startTime = startPrintDate; Currently, my schedule runs from 21:30 to 06:00. I would like to add this as a SINGLE recurring entry instead of multiple, broken up, entries. My system details: Linux 2.6.15-gentoo-r1 KDE 3.4.3 Korganizer 3.4.2 In Ver 3.5 of korganizer in kde 3.5.1 the Agenda isn't correctly shown. I'll think that is great reduction of functionality in korganizer. Please check the follow example to understand what i mean. Make a new ewent "Sample". Then go to reccurance and enable it. Leave the form with OK. Than take a look at the Agenda in the next week and you see the event. Now go back to the "Sample" and double klick on it. Now set the date of the end of this appointment to the next day. After closing with OK go back to the agenda and look at the future week's. There is no event shown. I'll can't understand this Bug, because the event's were right shown in the "monthly" view. Thank you for your Work This bug is still open in korganizer! And this since 2002! I recently discovered that multi-day appointments resolve into single day appointments in whole day area when defined as recurrent, defined nonrecurring they figure correctly as a continuos block. Rummaging bugs.kde.org has lead me here, I hope I am on the beam. Hoping, too, that this bug will soon be patched. Reassigning all KOrganizer bug reports and wishes to the newly created korganizer-devel mailing list. *** Bug 130109 has been marked as a duplicate of this bug. *** *** Bug 122945 has been marked as a duplicate of this bug. *** *** Bug 112483 has been marked as a duplicate of this bug. *** *** Bug 122390 has been marked as a duplicate of this bug. *** As the reporter of bug 130109, I'm wondering if this old bug is on tap to be resolved in KDE 4.0. It has been fixed in KDE4. I'm sorry but i must disagree. The bug is still present in korganizer 4.1.0. @Folken: can you tell me exactly the steps to reproduce it? I've created an recurring event which end at midnight, this event and all recurrences are displayed correctly, even using KDE 3.5.10. Maybe I've miss something for the test? Folken wrote:
> Create an event going past midnight. e.g. 2am of the next day. Now mark
> the event reoccur weekly. Switch to Month view and you will see the
> event repeat. Switch back to week view and you will see it in the week
> you entered it, but switch to the following week and the reoccurring
> event is no longer displayed.
Thanks Folken, doing this step, I've reproduced it.
With KDE 4.1.73 (KDE 4.1.72 (KDE 4.2 >= 20081112)) "release 3.3", reproduced it using comment #23 steps. I'm working on this, expect it fixed in trunk soon. *** Bug 142560 has been marked as a duplicate of this bug. *** *** Bug 145317 has been marked as a duplicate of this bug. *** SVN commit 917150 by smartins: Performance improvement in agendaview and support for multi-day recurring events in korganizer. Use timesInInterval() in KOAgendaView::fillAgenda() Discussion at http://reviewboard.vidsolbach.de/r/358/ BUG: 42899 M +109 -84 koagendaview.cpp M +1 -1 koagendaview.h WebSVN link: http://websvn.kde.org/?view=rev&revision=917150 *** Bug 150478 has been marked as a duplicate of this bug. *** *** Bug 149225 has been marked as a duplicate of this bug. *** |