Event context menu propose to change attendance in a readonly calendar

RESOLVED FIXED in 1.9.1

Status

Calendar
Lightning Only
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Michael Bailly, Assigned: Decathlon)

Tracking

unspecified
1.9.1

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
When focusing on an event and right-clicking on it, the context menu allows me to change my attendance.
This choice should not be shown if the event is in a read-only calendar.

Comment 1

5 years ago
Thanks.

I can confirm this issue. Lightning 1.8 and thunderbird 16.0.1
(Assignee)

Comment 2

5 years ago
Created attachment 675823 [details] [diff] [review]
patch - v1

This patch fixes the bug, but I'm not sure about the desired behavior when two or more events with calendars writable and read-only are being selected at the same time. Should the "Attendance" menu item be enabled in that case?
I resolved making it enabled (the same for the "delete" menu item, although this case is a bit different) but in order to avoid an error that occurs when the change of attendance is being executed for events with non read-only calendars, it has to prevent executing the command for such events.

The way I've done it maybe is too simple but it solves this second issue and at the end of the command the items with read-only calendar still are selected and this could be useful as an indication to the user that the command has not be executed for those items, not sure if this behavior is right though.
Assignee: nobody → bv1578
Status: NEW → ASSIGNED
Attachment #675823 - Flags: review?(philipp)
(Assignee)

Updated

5 years ago
OS: Linux → All
Hardware: x86 → All
Comment on attachment 675823 [details] [diff] [review]
patch - v1

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

I think the way you put it is the best solution, otherwise the user might need to go hunting which items are readonly. r=philipp with one minor nit.

I'd like to see this on aurora and beta since its a good fix for enterprise calendars and the ESR is coming up. Could you cross-push it to all three trees?

::: calendar/base/content/calendar-item-editing.js
@@ +532,5 @@
>      startBatchTransaction();
>      try {
>          for each (let oldItem in items) {
> +            // Skip this item if its calendar is read only. 
> +            if (oldItem.calendar.getProperty("readOnly")) {

You can directly use oldItem.calendar.readOnly here. Also an extra whitespace in the comment line.
Attachment #675823 - Flags: review?(philipp)
Attachment #675823 - Flags: review+
Attachment #675823 - Flags: approval-calendar-beta+
Attachment #675823 - Flags: approval-calendar-aurora+
(Assignee)

Comment 4

5 years ago
Created attachment 678682 [details] [diff] [review]
patch with corrections

I don't have an HG account yet (I know, I have to request it). I set the "checkin-needed" keyword.
Attachment #678682 - Flags: review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Pushed to comm-central changeset de55fd457665
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1
Keywords: checkin-needed
Comment on attachment 675823 [details] [diff] [review]
patch - v1

Oops I forgot to push this to beta/aurora. Since this is now on aurora anyway, I'm going to push to beta and release and add this to 1.9.1
Attachment #675823 - Flags: approval-calendar-aurora+ → approval-calendar-release+
Whiteboard: [wanted-1.9.x]
comm-esr17 - https://hg.mozilla.org/releases/comm-esr17/rev/744ed601b22a
Target Milestone: 2.1 → 1.9.1
Whiteboard: [wanted-1.9.x]
Depends on: 886025
You need to log in before you can comment on or make changes to this bug.