Closed Bug 1476736 Opened 6 years ago Closed 6 years ago

Calendar print preview is empty if a caldav calendar could not be loaded before

Categories

(Calendar :: Printing, defect)

Lightning 5.4.8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: MakeMyDay, Assigned: MakeMyDay)

Details

Attachments

(1 file, 1 obsolete file)

STR
1. Have a local and a network calendar without offline support configured
2. Make sure the network calendar it is not available and start TB
3. Switch to calendar view and try to print it

Observed:
The print preview is blank.

Expected:
The print preview should be displayed and should show the events from the local calendar.

This is already an issue with ESR 52, so not related to bug 1101381.
This is only a issue if a caldav calendar could not be loaded. All other providers are ok.

Alternatively to passing to this.mOfflineStorage.getItems we could as well notify about an error (what would bring up the unavailable message in the error console when refreshing the print preview).
Assignee: nobody → makemyday
Status: NEW → ASSIGNED
Attachment #8993497 - Flags: review?(philipp)
Summary: Calendar print preview is empty if a calendar could not be loaded before → Calendar print preview is empty if a caldav calendar could not be loaded before
Comment on attachment 8993497 [details] [diff] [review]
NoPrintingIfCaldavCalendarNotAvailable-V1.diff

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

::: calendar/providers/caldav/calDavCalendar.js
@@ +1297,5 @@
>                                               null,
>                                               null);
>              }
> +        } else if (this.checkedServerInfo ||
> +                   !Components.isSuccessCode(this.getProperty("currentStatus"))) {

I think our currentStatus code isn't all that reliable, I am concerned that with this we would get stuck in a place where we'd always getItem from the offline storage. Is there another way to solve this?
Attachment #8993497 - Flags: review?(philipp) → feedback-
In the use case of this bug the error at that stage is READ_FAILED. So we can limit it to that error and maybe OPERATION_CANCELLED and leaving out any other errors since redaing is what we want to do in getItems.
This limits loading the (empty) offline list to the case the calendar is currently in status READ_FAILED, which should be appropriate since this is a read operation where this is in. So using the status here is safe.

This fixes partly also a similar issue of not loading the unifinder list at load time in the same scenario - at least to the extend of being able to get list entries when switching the unifinder filter after the initial load - for the first one the unifinder would need to do lazy loading, but this is beyond the scope if this bug.
Attachment #8993497 - Attachment is obsolete: true
Attachment #8995102 - Flags: review?(philipp)
Comment on attachment 8995102 [details] [diff] [review]
NoPrintingIfCaldavCalendarNotAvailable-V2.diff

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

Very well, we can try this. It does seem we cover most cases of setting currentStatus.
Attachment #8995102 - Flags: review?(philipp) → review+
Keywords: checkin-needed
Could be rephrase the commit message here, it's confusing:
  Allow printing even if at least one caldav calendar is not available.
Do you mean:
  Allow printing even if some caldav calendar is not available.
  Allow printing even if one or more caldav calendars are not available.

Take you pick ;-)
Oops: Take your pick.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/92d500eaee7f
Allow printing even if some caldav calendar is not available. r=philipp
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.6
Comment on attachment 8995102 [details] [diff] [review]
NoPrintingIfCaldavCalendarNotAvailable-V2.diff

I think this is a candidate for an uplift.
Attachment #8995102 - Flags: approval-calendar-esr?(philipp)
Attachment #8995102 - Flags: approval-calendar-beta?(philipp)
Comment on attachment 8995102 [details] [diff] [review]
NoPrintingIfCaldavCalendarNotAvailable-V2.diff

Too late for 63/6.5 beta now.
Attachment #8995102 - Flags: approval-calendar-beta?(philipp)
Comment on attachment 8995102 [details] [diff] [review]
NoPrintingIfCaldavCalendarNotAvailable-V2.diff

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

Please keep an eye out for reports once we release the ESR with this patch.
Attachment #8995102 - Flags: approval-calendar-esr?(philipp) → approval-calendar-esr+
TB 60.5 ESR, Cal. 6.2.5:
https://hg.mozilla.org/releases/comm-esr60/rev/6ef3a77ffadde78ca6fa11e1cd98a28834fce09a

Target needs to be set to 6.2.5. Philipp?
Flags: needinfo?(philipp)
Whiteboard: Target needs to be set to 6.2.5
Target Milestone: 6.6 → 6.2.4
Flags: needinfo?(philipp)
Whiteboard: Target needs to be set to 6.2.5
Target Milestone: 6.2.4 → 6.2.5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: