Closed Bug 800333 Opened 12 years ago Closed 12 years ago

Event context menu propose to change attendance in a readonly calendar

Categories

(Calendar :: Lightning Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mbailly, Assigned: bv1578)

References

Details

Attachments

(2 files)

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.
Thanks.

I can confirm this issue. Lightning 1.8 and thunderbird 16.0.1
Attached patch patch - v1 β€” β€” Splinter Review
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)
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+
Attached patch patch with corrections β€” β€” Splinter Review
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+
Keywords: checkin-needed
Pushed to comm-central changeset de55fd457665
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1
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]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: