Open Bug 1008681 Opened 11 years ago Updated 2 years ago

Attendee Dialog: duplicates in attendee list are not recognized

Categories

(Calendar :: Dialogs, defect)

defect

Tracking

(Not tracked)

People

(Reporter: MakeMyDay, Unassigned, NeedInfo)

Details

(Keywords: good-first-bug, Whiteboard: [invite attendees dialog])

If adding attendees to the list in attendee dialog, duplicates are not recognized and therefor added to the invitation. We need to check and remove all duplicates (case insensitive and based on attendee id) with or without a respective user information latest when closing the dialog (or each time a list field loses the focus). The issue exists as well in Lightning 2.6.4 as in current Nightly.
Whiteboard: [invite attendees dialog]
Whiteboard: [invite attendees dialog] → [invite attendees dialog][good first bug]
Hi, I am ready to take this one if its still there.
Great. Feel free to provide a patch. The respective code lives here[1]. It is recommended to have set up a TB build environment [2]. If you have questions on that, you can ask in #calendar or #maildev on irc. [1] https://dxr.mozilla.org/comm-central/source/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml [2] https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Thunderbird_build
Assignee: nobody → mr.devanshdalal
Status: NEW → ASSIGNED
@[:MakeMyDay], Hi, I am sorry I would not be able to continue this one. Please anyone, feel free to take this.
Assignee: mr.devanshdalal → nobody
Status: ASSIGNED → NEW

Hi, I would like to take up this bug.
As I have understood, either I need to maintain a hashmap and check each time a new person is added if his ID is present in the hashmap or I can do it in linear time for each attendee. Is that right?

That sounds about right. You could possibly re-use https://searchfox.org/comm-central/source/chat/modules/NormalizedMap.jsm#18 and extend it to be a CaseInsensitiveMap. The file would have to be moved to a more common location.

@Fallen , I dont understand why Case insensitive maps are needed for this task. Shouldnt we compare based on IDs (not names) ?

If you want me to write a general purpose map, sure, I ll be happy to write it. But I dont think we need it for this issue.

:Fallen, Can you please guide me how to reproduce the bug? I have tried the following:
=>Same person with different mail ids and different people with same mail ids. When we add the person and an id multiple times to the attendee list or different people with same mail id, after reopening the tab , the list is eliminating all the duplicates based on mail id.

Flags: needinfo?(philipp)

The attendee id could have a different case, I read from comment 0 that it needs to be case insensitive.

Flags: needinfo?(philipp)

@[:MakeMyDay] @Fallen
I created an event and added two contacts from the address book with different names but same email ids with different cases. The first invitee was removed.

Flags: needinfo?(philipp)
Flags: needinfo?(makemyday)

I'll leave it to MakeMyDay to answer here, it could be that this bug is WFM but maybe he meant something different.

Flags: needinfo?(philipp)

Can you please clarify ?

Keywords: good-first-bug
Whiteboard: [invite attendees dialog][good first bug] → [invite attendees dialog]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.