Closed Bug 1572964 Opened 8 months ago Closed 4 months ago

Last day of event spanning multiple days not displayed in calendar (when span month end? depending on first day of week?)

Categories

(Calendar :: Calendar Views, defect, critical)

Lightning 6.2
Desktop
All
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
68.3.1

People

(Reporter: andrew.barnes, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

Attachments

(8 files, 1 obsolete file)

Attached file Bug screenshots.odt

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Using Thunderbird 60.8.0 (32-bit)
Set up a calendar event with timed start and end which spans a month end. For example, event "Holiday" start 22:00 14th August 2019; end 05:00 1st September 2019.

Actual results:

Event shows correctly in "August" month display - with 14th showing:
|--> 22:00 Holiday
all intermediate days showing:
<--> Holiday
and 1st showing:
-->| 05:00 Holiday

However, in the "September" month display there is no entry for 1st.

If the final date/time is later in the month - for example 05:00 4th September, then again the final (partial) day does not display.

Screenshots attached.

Expected results:

The finish date/time should show correctly in both the August and September monthly displays.

I think you left out some information.

In Calendar > Views preferences, you probably have "Start the week on Monday" set. Is that correct?
I can reproduce the problem with that setting.

If I start the week on Sunday, August ends on Saturday the 31st in Month view, and the event shows when I switch to September.

Thanks for the helpful screenshots!

Does changing the start of the week fix it for you? Can you use that setting? It appears Sunday is the only selection that works.

Status: UNCONFIRMED → NEW
Component: Untriaged → Calendar Views
Ever confirmed: true
Flags: needinfo?(andrew.barnes)
OS: Unspecified → All
Product: Thunderbird → Calendar
Hardware: Unspecified → Desktop
Summary: Calendar display problem → Calendar display problem with Start of week not set to Sunday
Version: 60 → Lightning 6.2

Walt -

You are right, if I change the Start day of the week to Sunday then the problem as I have reported it goes away. However, if I then set up "Holiday 2" running from 21st May to 1st June 2019 then the same problem recurs on Saturday 1st June ... :-( ... so it is a generic bug.

I don't seem to be able to attach a further file of screenshots here, so will reply to your email ...

Thanks

Andrew

Flags: needinfo?(andrew.barnes)

Ah - my attempt to email the extra screenshots has bounced back ... :-( ... is there some other way I can send them to you?

Andrew

(In reply to Andrew Barnes from comment #3)

Ah - my attempt to email the extra screenshots has bounced back ... :-( ... is there some other way I can send them to you?

Andrew

I'm testing on Windows 10 right now.

You should be able to attach individual image files using Attach File. That way anyone that may take an interest in the bug report can view them.

I can confirm the event doesn't show on the 1st of the month. I created a test event starting Saturday September 21 at 5 pm, ending October 1 at 6 pm and it doesn't appear when I switch from September to October.

Summary: Calendar display problem with Start of week not set to Sunday → Calendar display problem with events ending on the 1st of the month
Attached image Calendar.PNG
Attached file Bug screenshots 2.odt

Ah - right - sorry, I missed the attach link last time round because it was above all the comments ... :-(

Now sorted.

Andrew

It's not just the 1st of the month that has a problem ... as per the comment in my original bug report ...

 "If the final date/time is later in the month - for example 05:00 4th September, then again the final (partial) day does not display."

... it seems that the final day for any event that spans a month end does not display.

Regards

Andrew

(In reply to Andrew Barnes from comment #7)

It's not just the 1st of the month that has a problem ... as per the comment in my original bug report ...

 "If the final date/time is later in the month - for example 05:00 4th September, then again the final (partial) day does not display."

... it seems that the final day for any event that spans a month end does not display.

Regards

Andrew

Feel free to edit the Summary.

Summary: Calendar display problem with events ending on the 1st of the month → Calendar display problem with events with start/end times which span a month end

Just tested this in TB 69.0b2 with Lightning 69.0b2 and I see the problem there in Multiweek and Month views.

Also TB 70.0a1 with Lightning 70.0a1.

Does not appear to be a problem if using Recurring events.

Create the event.
Start it today and have it reoccur Daily until the end date using the same start and end time for each occurrence.

Severity: normal → critical
Attached image weekview.png

Confirmed with week view too using Thunderbird / Lightning 68 (20190812205125).

Have not found pattern yet. Doesn't seem related to first day of week. Happens too for events that don't span month end.

Summary: Calendar display problem with events with start/end times which span a month end → Last day of event spanning multiple days not displayed in calendar (when span month end? depending on first day of week?)
Duplicate of this bug: 1579225
Duplicate of this bug: 1579650
Attached image screenshot.216.jpg

Same here (Europa/Berlin). The last day is missing on a long event. It's very critical, because it concerns the rental of holiday apartments.

Duplicate of this bug: 1599976

It appears this doesn't happen in Daily, can you confirm Stefan?

Edit: actually, I can't reproduce it at all on 68, Beta or Daily.

Flags: needinfo?(ssitter)

I can make odd things happen if I change the timezone preference, which is definitely a bug, but I don't think it's this bug.

Flags: needinfo?(ssitter)

Found it!

Assignee: nobody → geoff
Status: NEW → ASSIGNED

If the start of the event falls outside the current view, we use the start date of the current view instead, saving a lot of wasted calculation. But that date is only a date, it doesn't have time information. Comparing a date against a date+time is different from comparing two date+times, and the end of the event has a time, so we have a problem.

Attachment #9112421 - Flags: review?(paul)
Attachment #9112421 - Flags: approval-calendar-esr?(paul)

I've written a test to prove we have event boxes on all the right days. (We should've had this test over a decade ago, but now's the next best time.) It tests events that are fully within the view, and events that start and/or end outside the view.

The "arbitrary" timeouts I've disabled warnings about match a timeout in the day/week view – the purpose of which I don't entirely understand, so I'm not going to change it now.

Attachment #9112646 - Flags: review?(paul)

If I may add a comment I would say that changing the first day of the week do not solve the problem, is actually make it worse and transfer the glitch to the monthly view too.

I never had problem with this issue until the other day when I update the repositories of thunderbird for ubuntu to have the latest version.

After the update of the calendar plug-in the problem began.

I'm just a "user" so what I can do is give feedback about the problem, no idea how to solve it or how to patch it.

regards.

Attachment #9112421 - Flags: approval-calendar-beta?(paul)
Comment on attachment 9112421 [details] [diff] [review]
1572964-last-day-box-1.diff

Review of attachment 9112421 [details] [diff] [review]:
-----------------------------------------------------------------

Nice find and fix.  After reproducing the problem (when the start day was not in the current view, the last day was not shown), I confirmed that with this patch the last day is shown.
Attachment #9112421 - Flags: review?(paul)
Attachment #9112421 - Flags: review+
Attachment #9112421 - Flags: approval-calendar-esr?(paul)
Attachment #9112421 - Flags: approval-calendar-esr+
Attachment #9112421 - Flags: approval-calendar-beta?(paul)
Attachment #9112421 - Flags: approval-calendar-beta+
Comment on attachment 9112646 [details] [diff] [review]
1572964-event-display-test-1.diff

Review of attachment 9112646 [details] [diff] [review]:
-----------------------------------------------------------------

r+ Great to have a test for this.  It gets a little repetitive and we could probably refactor to make it more DRY, but given other priorities, I'd say go with it as-is.  Passes when run locally.  There are a lot of "undefined assertion name" but I guess we're okay with that?  It does add some work to name each assertion.

::: calendar/test/browser/browser_eventDisplay.js
@@ +30,5 @@
> +  // This event is fully within this view.
> +
> +  goToDate(cal.createDateTime("20190403"));
> +  await BrowserTestUtils.waitForEvent(dayView, "viewloaded");
> +  // eslint-disable-next-line mozilla/no-arbitrary-setTimeout

It might be worth adding a comment about these matching a timeout in the day/week view, and that's why they are here.

@@ +127,5 @@
> +  for (let i = 0; i <= 1; i++) {
> +    info(dayBoxes[i].date.icalString);
> +    ok(!dayBoxes[i].querySelector("stack calendar-event-box"), "No event shown");
> +  }
> +  for (let i = 2; i <= 4; i++) {

Would be nice if we had a 'range' function to do:
for (let i of range(2, 5)) {...}
(Just thinking out loud, not suggesting to do anything differently here.)

@@ +233,5 @@
> +  await calendar.deleteItem(event);
> +});
> +
> +/**
> + * Test an event that occurs fully within the week view.

"multi-week view", and same thing on the next one.
Attachment #9112646 - Flags: review?(paul) → review+
Attachment #9112646 - Attachment is obsolete: true
Attachment #9113615 - Flags: review+

(In reply to Paul Morris [:pmorris] from comment #22)

r+ Great to have a test for this. It gets a little repetitive and we could
probably refactor to make it more DRY, but given other priorities, I'd say
go with it as-is.

There's some stuff which probably could be tidied up but on the whole I avoid doing a lot of refactoring in tests because it makes it more difficult to tell exactly what is going on. Plus it means one small mistake in code that is used over and over can render a whole test useless. I like DRY, but not so much in tests.

There are a lot of "undefined assertion name" but I guess we're okay with
that? It does add some work to name each assertion.

I really wish mochitest would print the 5 == 5 type messages some of the other suites do. Generally I'm just lazy when it comes to labelling assertions if I think it's easy enough to work out what's going on. ;-)

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/024dcda92904
Show last day of event that starts outside the current view; r=pmorris
https://hg.mozilla.org/comm-central/rev/50716b66d571
Test display of events that start or end outside the current view; r=pmorris

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED

Needs a 73 milestone.

Flags: needinfo?(philipp)
Target Milestone: --- → 72
Flags: needinfo?(philipp)
Target Milestone: 72 → 73

So as it is claimed fixed, when it going to be fixed? Is going to be an update? TIA for the info.

It's fixed in our development channel. If all goes to plan it will be fixed in a beta update next week, and in the release channel when that updates to 68.4, which I believe is early January.

(In reply to Geoff Lankow (:darktrojan) from comment #28)

It's fixed in our development channel. If all goes to plan it will be fixed in a beta update next week, and in the release channel when that updates to 68.4, which I believe is early January.

thank you very much for the fixing and the info, much appreciated.

Target Milestone: 72 → 68.3.1
Duplicate of this bug: 1606391
You need to log in before you can comment on or make changes to this bug.