multiday (week) view: event spanning days loses its last day if end time <= start time (regardless of day)

VERIFIED FIXED

Status

VERIFIED FIXED
13 years ago
13 years ago

People

(Reporter: calum.mackay, Assigned: jminta)

Tracking

Trunk
x86
Linux

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
Linux/x86, my build today from cvs; 20060119.

If an events spans multiple days, and its end time-of-day is <= its start time-of-day, then the last day of the event will not appear in the multiday (week) view.

Create an event: 1700 25th Jan 2006 - 1600 27th Jan 2006.

Switch to multiday (week) view for that week.

Note that the event is shown as starting at 1700 25th, appears all day on the 26th, but does not appear at all on the 27th, which it should.

(Note the hover popup shows the correct span throughout).

Change the event end to 1700 27th.

Note that the event still does not appear at all in on the 27th.

Change the event end to 1701 27th.

Note that the event now appears correctly on the 27th.

I'm not certain that this didn't happen with the old views, so not blocking the new views regression bug 321164. Unless someone can assure me otherwise?
(Assignee)

Updated

13 years ago
Assignee: mostafah → michael.buettner
(Assignee)

Comment 1

13 years ago
Created attachment 210097 [details] [diff] [review]
patch v1

Sorry for stepping on toes here, Michael.  I discovered the problem+solution when I was working with long events for the month-view as well.  Since dmose is already reviewing that patch and this one works similarly, I thought it best to get them both out at the same time.

The basic issue, we iterate until targetDate > finishDate.  We need to move the hours to 00:00 so that we get the last day, otherwise targetDate will pass finishDate 1 day too early.
Assignee: michael.buettner → jminta
Status: NEW → ASSIGNED
Attachment #210097 - Flags: first-review?(dmose)
Comment on attachment 210097 [details] [diff] [review]
patch v1

>Index: calendar/base/content/calendar-multiday-view.xml
>===================================================================
>RCS file: /cvsroot/mozilla/calendar/base/content/calendar-multiday-view.xml,v
>retrieving revision 1.56
>diff -p -U8 -r1.56 calendar-multiday-view.xml
>--- calendar/base/content/calendar-multiday-view.xml	26 Jan 2006 17:45:35 -0000	1.56
>+++ calendar/base/content/calendar-multiday-view.xml	29 Jan 2006 23:07:28 -0000
>@@ -2293,20 +2293,26 @@
>       <method name="findColumnsForItem">
>         <parameter name="aItem"/>
>         <body><![CDATA[
>           var columns = new Array();
> 
>           // We don't support tasks here, yet
>           if (!(aItem instanceof Components.interfaces.calIEvent))
>               return columns;
>+          var tz = this.mDateColumns[0].date.timezone;
> 
>           // Note that these may be dates or datetimes

Since the |var tz| line logically belongs to the lines below it rather than the lines above, I'd suggest swapping that line and the blank line below it.

r=dmose@mozilla.org with that tweak.
Attachment #210097 - Flags: first-review?(dmose) → first-review+
(Assignee)

Comment 3

13 years ago
patch checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
(Reporter)

Updated

13 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.