fails to display all calender items in a single day if there is a zero time item that is not the first item. [day view, week view, event length, duration]

VERIFIED FIXED

Status

VERIFIED FIXED
14 years ago
12 years ago

People

(Reporter: john, Assigned: mostafah)

Tracking

Sunbird 0.2

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10

sunbird calandar fails to display all of the calandar items for a single day if
I add an item that lasts zero time, then add an item that starts earlier than
it. they still appear in the top pane that lists all of the items in you
calandar and searches them and they also appear in multi week view but not in
say or week views. if I first add another item after it than it still displays
them but it makes them narower like they are concurent.

Reproducible: Always
Steps to Reproduce:
1.on a blank day add an event with the start time and end time set the same
2.add anoter item that starts earlier that the zero time event but does not run
concurent


Actual Results:  
you can add all you want that day and you will get no display

Expected Results:  
you should still see all of the events for that day.

just using all of the defaults

Comment 1

14 years ago
This seems to be the best one that describes my problem as well.  I imported my
.ics calendar file from an exported ical file into the new Sunbird client.  When
I switched to dayview, I didn't see any appointments for today.  I clicked on
the next day and saw that there were some, but the zero time appointments were
just a line.  Since I live by my reminders, I have zero time appointments all
over my weekly calendar.  Most days don't have more than one appointment that
are not a zero time.  Only Tuesday has two regular appointments that are not
zero times.  I checked all Tuesdays and I saw all the appointments for those
days, but NONE of the other days had anything visible in the day or weekly
views.  At first glance, I thought Sunbird wasn't displaying anything unless
bracketed by an appointment that was not of zero length on both sides of the
day.  After reading this bug, I would suppose that during the import, I ran into
this problem instead.  When I recreate the times that I added the appointments,
I see that I did add a least one appointment after a zero time appointment,
which meats the criteria of this bug.  However, this bug doesn't explain why I
can see Tuesday appointments without a problem.

Comment 2

14 years ago
(In reply to comment #1)

I should also mention that this is the Sunbird client for the Mac OS X, so it
spans at least two clients.

Comment 3

14 years ago
Confirmed.  Applies to calendar xpi as well.

An error appears in JavaScript Console:

Error: dayEventEndList[eventEndListIndex] has no properties
Source File: chrome://calendar/content/calendarWindow.js
Line: 838
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Summary: SUNBIRD: fails to display all calander items in a single day if there is a zero time item that is not the first item. → fails to display all calender items in a single day if there is a zero time item that is not the first item. [day view, week view]
Version: unspecified → Sunbird 0.2RC2

Comment 4

14 years ago
Created attachment 173701 [details]
test case: event before zero length event

Comment 5

14 years ago
Created attachment 173703 [details] [diff] [review]
calendarWindow.js patch: check for zero length events

(patch -l -p 2 -i file.patch)

Day/Week view layout algorithm in setDrawProperties needs to watch for
zero-length events.

Patch depends on patch from Bug 251771 attachment 172065 [details] [diff] [review].

Algorithm sorts events twice, once by starts, and once by ends.
It then loops choosing the next event to work on depending on whether the next
start time or the next end time is sooner.  Normally if they are equal, that
means an event is ending at the same time a later event is starting, so it
should remove the ending event first to make room for the next starting event. 
The starting list should always runs out before the ending list.  But if there
are zero length events at the end, this causes the algorithm to try to remove
the zero length event that was not added yet, and it erroneously runs of out
ending events before starting events.

This patch checks for zero length events at the same time appearing at the head
of both the event starts list and the event ends list, and adds them as starts
before removing them as ends.  This causes it to add all zero length events
with the same time before removing any of them so the above problem does not
occur, even with multiple zero-length events at the same time.	

Any events that started earlier and end at that time should be removed first,
so the patch also modifies the end comparator to sort such events before zero
length events (sort events with equal ends by start).

(Patch tested with 0.2 branch, can test against trunk after nightly build is
available for w2k)

Updated

14 years ago
Depends on: 251771

Comment 6

14 years ago
*** Bug 262405 has been marked as a duplicate of this bug. ***

Comment 7

14 years ago
(added [event length, duration] key words to summary to make easier to find)
Summary: fails to display all calender items in a single day if there is a zero time item that is not the first item. [day view, week view] → fails to display all calender items in a single day if there is a zero time item that is not the first item. [day view, week view, event length, duration]

Comment 8

14 years ago
*** Bug 285170 has been marked as a duplicate of this bug. ***

Comment 9

14 years ago
*** Bug 273866 has been marked as a duplicate of this bug. ***

Updated

13 years ago
QA Contact: gurganbl → sunbird

Comment 10

13 years ago
Created attachment 195092 [details] [diff] [review]
v2: calendarWindow.js patch: check for zero length events

(patch -l -p 2 -i file.patch)

Updated patch.

Events in test case now appear in day view (previously failed to appear)
Attachment #173703 - Attachment is obsolete: true
Attachment #195092 - Flags: first-review?(mvl)
Attachment #195092 - Flags: first-review?(mvl) → first-review+
patch checked in
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED

Comment 12

13 years ago
*** Bug 310240 has been marked as a duplicate of this bug. ***

Updated

12 years ago
Status: RESOLVED → VERIFIED
Version: Sunbird 0.2RC2 → Sunbird 0.2
You need to log in before you can comment on or make changes to this bug.