Print Preview shows "All day - All day" for allday events

RESOLVED FIXED in 1.8

Status

Calendar
Printing
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Fallen, Assigned: Stefan Sitter)

Tracking

({regression})

Lightning 1.7
regression

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Noticed this by two reporters from the blog. For all day events the print preview incorrectly shows the interval for all day events.
(Assignee)

Comment 1

5 years ago
Caused here:
> http://mxr.mozilla.org/comm-central/source/calendar/base/modules/calPrintUtils.jsm#90
> let itemInterval = cal.getDateFormatter().formatItemTimeInterval(item);

This will always create a string like "starttime-endtime", i.e. "All Day-All Day" for an all day event. Previously there was more logic used to determine the correct format.
(Assignee)

Updated

5 years ago
Blocks: 757902

Comment 2

5 years ago
In our case, it is the printing (monthly view) that show this behavior and it is a regression from the previous version we were using. A 3 days recurring all day event will print only on the first day as: "All Day-All Day Event name".

A fix would be appreciated. Thanks...
(Assignee)

Comment 3

5 years ago
Rene, the second part of your problem is filed as bug 787537.

Comment 4

5 years ago
Stefan,

Thanks for pointing me to the existing problem. Sorry I did not find it when I looked yesterday...
(Assignee)

Updated

5 years ago
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
(Assignee)

Comment 5

5 years ago
Created attachment 658938 [details] [diff] [review]
regression fix (omit time for all-day items like in Lightning 1.6)
Attachment #658938 - Flags: review?(philipp)
Attachment #658938 - Flags: approval-calendar-beta?
Attachment #658938 - Flags: approval-calendar-aurora?
(Reporter)

Comment 6

5 years ago
Comment on attachment 658938 [details] [diff] [review]
regression fix (omit time for all-day items like in Lightning 1.6)

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

::: calendar/base/modules/calPrintUtils.jsm
@@ +164,5 @@
> +            return "";
> +        }
> +
> +        // Bug 787537: will result in wrong time label for events that span two or more days
> +        return cal.getDateFormatter().formatItemTimeInterval(aItem);

Hmm tough call. My original thought was that it makes more sense to fix this in the date time formatter, but if we always return a blank string there this might not be wanted in other places.

I see two options:

1. Keep the patch like it is (r=philipp for that)
2. Check other callers of formatItemTimeInterval() to see if an empty string makes sense there too and move this code into the formatter.

Let me know what you think
Attachment #658938 - Flags: review?(philipp)
Attachment #658938 - Flags: review+
Attachment #658938 - Flags: approval-calendar-beta?
Attachment #658938 - Flags: approval-calendar-beta+
Attachment #658938 - Flags: approval-calendar-aurora?
Attachment #658938 - Flags: approval-calendar-aurora+
(Assignee)

Comment 7

5 years ago
I think I'll go with pushing the patch as is for now to fix the current problem.

calDateTimeFormatter::formatItemTimeInterval() is only called once in calPrintUtils.jsm, therefore it might be possible to move the all day logic into it. We still need to work on this to fix the wrong times printed for multi day events. We can use Bug 359007 for this.
(Assignee)

Comment 8

5 years ago
Pushed to https://hg.mozilla.org/comm-central/rev/601fc607aaf9
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0
(Assignee)

Comment 9

5 years ago
Pushed to https://hg.mozilla.org/releases/comm-aurora/rev/9a8111084ff8
Target Milestone: 2.0 → 1.9
(Assignee)

Comment 10

5 years ago
Pushed to https://hg.mozilla.org/releases/comm-beta/rev/39fbe678702a
Target Milestone: 1.9 → 1.8
You need to log in before you can comment on or make changes to this bug.