Closed Bug 261890 Opened 20 years ago Closed 19 years ago

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]

Categories

(Calendar :: Sunbird Only, defect)

Sunbird 0.2
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: john, Assigned: mostafah)

References

Details

Attachments

(2 files, 1 obsolete file)

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
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.
(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.
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
(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)
Depends on: 251771
*** Bug 262405 has been marked as a duplicate of this bug. ***
(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]
*** Bug 285170 has been marked as a duplicate of this bug. ***
*** Bug 273866 has been marked as a duplicate of this bug. ***
QA Contact: gurganbl → sunbird
(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
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 310240 has been marked as a duplicate of this bug. ***
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.

Attachment

General

Creator:
Created:
Updated:
Size: