gdata-provider
                                
                                 gdata-provider copied to clipboard
                                
                                    gdata-provider copied to clipboard
                            
                            
                            
                        Copied events add self as attendee
Describe the problem and steps to reproduce it:
Copying events without attendees with option "Synchronize events attendees" activated adds self as attendee to copies.
What happened?
I copied an event with zero attendees and the copy was turned into an event with self as attendee. Disactivating the "Synchronize events attendees" option eliminates this behaviour.
What did you expect to happen?
I would expect that the copies of events without attendees would not add self as an attendee.
Anything else we should know?
No error message is produced.
Confirming this based on code inspection. We do add the organizer as an attendee by default. I'm not sure if this is required in some way, either due to how Thunderbird works or the gdata API. Do you have the ICS of the event you are copying? Does it have an ORGANIZER property?
I create an event in TB and by default I am added as Organizer. The list of attendees is blank.
The copied event has the same Organizer property but with the Organizer added as an attendee.
This now seems to apply to any event created via Thunderbird. The organizer is always added as a guest.
If I remove myself from the list of attendees, everything works normally. It's not clear to me why the organizer needs to be added as a guest.
Creating an event through Google Calendar doesn't add oneself as attendee either.
I'm going to need the ICS of the event so I can reproduce this easier, @adrougk is this something you can provide?
@unode I'm not sure I understand the distinction you are making. If I create an event in Google Calendar and invite someone else, it shows two people for the event, the organizer (myself) and the person I invited. If I create an event in Thunderbird with no further attendees, I don't see attendees nor organizer in both places. It seems consistent?
If you are proficient with javascript, maybe you can edit the add-on's sources with this patch to see if it works better:
diff --git a/src/legacy/modules/gdataUtils.jsm b/src/legacy/modules/gdataUtils.jsm
index cd4b0e7..21a31e3 100644
--- a/src/legacy/modules/gdataUtils.jsm
+++ b/src/legacy/modules/gdataUtils.jsm
@@ -412,20 +412,13 @@ function EventToJSON(aItem, aOfflineStorage, aIsImport) {
       return attendeeData;
     };
-    let needsOrganizer = true;
     let attendeeData = [];
     for (let attendee of aItem.getAttendees()) {
       attendeeData.push(createAttendee(attendee));
-      if (aItem.organizer && aItem.organizer.id == attendee.id) {
-        needsOrganizer = false;
-      }
     }
     if (aItem.organizer) {
       itemData.organizer = createAttendee(aItem.organizer);
-      if (needsOrganizer) {
-        attendeeData.push(itemData.organizer);
-      }
     }
     if (attendeeData.length) {
I'm going to need the ICS of the event so I can reproduce this easier, @adrougk is this something you can provide?
@unode I'm not sure I understand the distinction you are making. If I create an event in Google Calendar and invite someone else, it shows two people for the event, the organizer (myself) and the person I invited. If I create an event in Thunderbird with no further attendees, I don't see attendees nor organizer in both places. It seems consistent?
Sorry, I no longer use this addon and cannot right now reproduce the error nor provide an ICS created by it.
No problem, thanks for getting back though! @unode could you try the patch?
~~Does Thunderbird or the XPI signing system restrict editing the contents of the XPI file?~~
~~I tried the changes above but then the Calendar interface reports that the add-on is no longer available and doesn't allow using the configured accounts.~~
I was trying to modify the XPI in-place. Re-installing locally worked around that part.
Regarding the patch, I think it goes in the right direction but is incomplete.
With the current XPI release the following happens:
- Creating an event adds no one to attendee list
- Editing the event adds me as attendee, even if I don't add anyone else to the invitees list
- Trying to add someone to the invitees list pre-populates it with my own address (making me be both organizer and attendee - this distinction isn't shown in Google's interface)
With the above patch:
- No change here
- Now no longer adds my email to attendee list
- Still populates the invitees list with my email
In point 3 having my name in the invitees list doesn't seem to be required. I can remove myself or replace my email with a different address and everything still works normally. Could we also make it such that the organizer's email isn't added to the invitees list? If we do this I think that's everything needed to close this issue.
~~An update on the above, I have been using the proposed changes for some time and they seem to have some unwanted consequences.~~ ~~With the patch, when updating the list of invitees no availability is shown. A gray bar is displayed instead.~~ ~~I also noticed that before the patch, pasting a list of emails separated by commas in the invitee edit window automatically split one email per line. However with the patch this stopped working.~~ ~~My guess is that what causes the gray bar also interrupts the splitting of email addresses per-line.~~
Turns out this is unrelated and seems to be caused by reinstalling any version of the plugin without restarting Thunderbird. After a restart the "gray bar" symptom is gone.
More testing needed...