Closed Bug 1740958 Opened 3 years ago Closed 2 years ago

Events lasting longer than a week can have incorrect number of "shadows" when dragging

Categories

(Calendar :: Calendar Frontend, defect)

defect

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
96 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: henry-x, Assigned: henry-x)

Details

Attachments

(1 file)

Steps to reproduce

  1. Create an event spanning 8 days.
  2. Start dragging the event from the second day.

Result

The shadow event that shows whilst dragging only spans two days.

Expect

The shadow event to span to the end of the week. This is what happens if you drag from the third day.

Origin

subtractDate will return a calDuration with weeks set instead of days if days would otherwise be exactly divisible by 7 https://searchfox.org/comm-central/rev/b75a50db5e0fbf134387e85e31aa6b035a0367ce/calendar/base/modules/Ical.jsm#3967

This means that calculations that ignore the weeks attribute fail, such as https://searchfox.org/comm-central/rev/b75a50db5e0fbf134387e85e31aa6b035a0367ce/calendar/base/content/calendar-multiday-view.js#387

I can't seem to reproduce this in v91. But the calendar code similarly doesn't take weeks into account in 91. And looking in the debugger, it seems that subtractDate returns an object with days = 7.

@darktrojan, can you confirm if 91 isn't effected? Do you know if something change in the backend such that the returned object from subtractDate is different than in 91, such that weeks wouldn't be set?

Flags: needinfo?(geoff)

The difference will be the calendar library in use. Daily uses ICAL.js but Beta and Release use libical. You can choose by setting calendar.icaljs to true or false. So yeah, this will need to be fixed in all versions.

Flags: needinfo?(geoff)
Target Milestone: --- → 96 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7987d9b876dd
Take week differences into account in the calendar multiday views. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: