Closed Bug 285892 Opened 20 years ago Closed 19 years ago

events disappear from week view when also showing other calendar containing invalid event [end before start]

Categories

(Calendar :: Sunbird Only, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozillabugzilla, Assigned: mostafah)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050301 Firefox/1.0.1 (Debian package 1.0.1-1)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050301 Firefox/1.0.1 (Debian package 1.0.1-1)

When using multiple calendars, if one of the calendar has a buggy event that has
a  start-date which is after the end-date, in the week view the events of the
other calendars after the start-date of the buggy event disappear.

This bug is deprecated since that code is being rewritten in trunk anyway. I
just figured i'd note it here to clarify this to others who might run into this bug.

Reproducible: Always

Steps to Reproduce:
1. subscribe to http://www.bzzt.net/~arnouten/sunbirdbug/sunbird.ics
2. go to week 14 in the week view
3. subscribe to http://www.bzzt.net/~arnouten/sunbirdbug/thalia-ical.ics

Now the events on thursday, friday and saturday disappear. Uncheck the
thalia-ical calendar in `Calendars' and they re-appear.

Actual Results:  
the events on thursday, friday and saturday disappear

Expected Results:  
not sure, but those events shouldn't disappear, that's for sure :)

Sunbird 0.2
JavaScript console reports:

Error: dayEventEndList[eventEndListIndex] has no properties
Source File: chrome://calendar/content/calendarWindow.js
Line: 838

Related to bug 261890, but not fixed by its patch.

Possible approaches for more graceful handling of such bad dates:

a.  don't display events with end < start, log warning to javascript console.
  (user may not notice anything is missing?)  Or
b.  display event with end = start + x duration
  (user may not notice anything is wrong?  If someone mistakenly moved up end
date instead of start date, may miss event.)
c.  display event with swapped display dates, log warning to js console.
  (user may be more likely to notice event earlier.)

Avoid popping up an alert box.  An event with end before start cannot be saved
by mozcal/sunbird, so the event is probably in a remote subscribed read-only
calendar that the user cannot correct.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: events disappear from week view when also showing other calendar containing invalid event → events disappear from week view when also showing other calendar containing invalid event [end before start]
(patch -l -p 2 -i file.patch)
(patch for SB0.2 branch, requires patches for bug 251771, bug 261890, may be
smoother with patches for bug 199422, bug 262811)

Changes:

Adds checkDisplayDatesInvariant method which checks that displayEndDate <
displayDate, and swaps them if not, logging warning to javascript console.

Adds call checkDisplayDatesInvariant to getViewLimits and setDrawProperties.

Tests:

Tested with reporter's files, looking at 2005.04.07, BeestFeest event runs
21:30--04:00 same day (invalid), 
- displayed as 04:00--21:30 in day view and week view.	
- Warning logged to javascript console when displayed in day view or week view.

- later events now display.

Tested using SB0.2 branch calendar extension with Moz1.8b1 and TB1.0 on w2k.
(Can test using trunk cal ext when nightly comes avaiable for w2k.)
Attachment #177293 - Flags: first-review?(pavlov)
Attachment #177293 - Flags: first-review?(pavlov) → first-review+
(finally) checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
QA Contact: gurganbl → sunbird
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: