Closed Bug 1588795 Opened 4 months ago Closed 4 months ago

Cannot save addresses in a mailing list

Categories

(Thunderbird :: Address Book, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 71.0

People

(Reporter: pmorris, Assigned: darktrojan)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

On current trunk. Open the address book. Create a new mailing list. Add some addresses. Click "OK" button in the dialog. The dialog closes but the addresses are not saved to the mailing list. They don't appear in the address book, and if you open the mailing list they don't appear in the dialog. Console has errors:

JavaScript error: , line 0: uncaught exception: 2147746065
JavaScript error: , line 0: uncaught exception: 2147500033
JavaScript error: , line 0: uncaught exception: 2147746065
JavaScript error: , line 0: uncaught exception: 2147746065
JavaScript error: resource:///modules/gloda/index_ab.js, line 108: TypeError: aItem.primaryEmail is null

(Discovered while working on some tests for this mailing list functionality.)

See Also: → 1588831
Keywords: regression
Priority: P3 → P1

We need to fix this for TB 71 beta due out next week.

Flags: needinfo?(geoff)

Sigh… this dialog clearly doesn't have tests and I clearly haven't tried to use it in a while.

There's two issues here:

  • when the mailing list is acting as a card it's missing some properties (such as firstName which is a totally logical thing for a mailing list to have) so GloDa gets confused (why GloDa is even interested in a mailing list at this point is beyond me)
  • when the mailing list is acting as a directory the addressLists array is supposed to be mutable but isn't (and there's no intention of fixing it) so adding or removing members of a list has no effect
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Flags: needinfo?(geoff)
Attachment #9101440 - Flags: review?(paul)
Regressed by: 1572324
Comment on attachment 9101440 [details] [diff] [review]
1588795-mailing-list-dialog-1.diff

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

Changes look good.  When I tested it, I was able to edit existing mailing lists, but creating a new mailing list did not work.  After the dialog closed the new mailing list was not shown in the address book.  Console says:

JavaScript error: chrome://messenger/content/addressbook/abMailListDialog.js, line 134: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIAbDirectory.addCard]
Attachment #9101440 - Flags: review?(paul) → feedback+

How … did I not notice that?

Cards can't be added to a mailing list that isn't attached to anything, so I've split the member list part of updateMailList into a separate function which is called after adding the mailing list to the address book.

Attachment #9101440 - Attachment is obsolete: true
Attachment #9101712 - Flags: review?(paul)
Comment on attachment 9101712 [details] [diff] [review]
1588795-mailing-list-dialog-2.diff

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

Changes look good.  Creating a mailing list works, except... for one little glitch  (sorry).  After you click the OK button to create the new list, the list is selected in the left column but the addresses you just added to it are not shown.  Clicking away from the list and back to it makes them appear.  This is not a problem when editing an existing list, where the changes appear immediately.
Attachment #9101712 - Flags: review?(paul) → feedback+

Shall we fix that elsewhere? There are multiple problems with the main address book window and I think they'd be better in another bug.

That also happens during import. The imported address book looks empty until you revisit again. I'll all in favour of doing this elsewhere so I have a patch to land now ;-)

Target Milestone: --- → Thunderbird 71.0

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/2a06340a320b
Fix broken mailing list dialog. r=pmorris

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Comment on attachment 9101712 [details] [diff] [review]
1588795-mailing-list-dialog-2.diff

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

r+ Good call on fixing the other glitch elsewhere.
Attachment #9101712 - Flags: review+
You need to log in before you can comment on or make changes to this bug.