Closed Bug 953135 Opened 6 years ago Closed 5 years ago

convertTo("vcard") method of nsIAbCard does not export e-mail address

Categories

(Thunderbird :: Address Book, defect)

defect
Not set

Tracking

(thunderbird38+ fixed)

RESOLVED FIXED
Thunderbird 39.0
Tracking Status
thunderbird38 + fixed

People

(Reporter: stlman, Assigned: stlman)

Details

Attachments

(1 file, 3 obsolete files)

Steps to reproduce:

1. Find a contact in an address book with a WorkCountry unset.
2. Access the contact as an instance of nsIAbCard from JS code.
3. Call card.convertTo("vcard").

Actual results:

Primary e-mail address is missing from the vCard.

Expected results:

Primary e-mail is exported to vCard.

Reason:

Invalid check for rv after calling

(void)GetPrimaryEmail(str);

http://mxr.mozilla.org/comm-central/source/mailnews/addrbook/src/nsAbCardProperty.cpp#631
I haven't tested the patch.
I haven't tested the patch.
Comment on attachment 8351486 [details] [diff] [review]
What seems to be an obvious fix (option #1)

So, it does work if your card has a work country ;-)

I prefer this patch because it's in the style of the display name, last name and first name.
Attachment #8351486 - Flags: review+
Attached patch Patch v1 (obsolete) — Splinter Review
Since the original patch author doesn't seem to be around, I am uploading the fix so that it gets in.

Thanks.
Attachment #8351486 - Attachment is obsolete: true
Attachment #8351488 - Attachment is obsolete: true
Attachment #8573325 - Flags: review?(neil)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(In reply to comment #3)
> So, it does work if your card has a work country ;-)

(In reply to Lukasz Stelmach)
> 1. Find a contact in an address book with a WorkCountry unset.

Suyash pointed out that you already said that. Sorry about that.
Comment on attachment 8573325 [details] [diff] [review]
Patch v1

># User Suyash Agarwal <syshagarwal@gmail.com>
Shouldn't this credit the original author? ;-)
Attachment #8573325 - Flags: review?(neil) → review+
(In reply to neil@parkwaycc.co.uk from comment #6)
> Comment on attachment 8573325 [details] [diff] [review]
> Patch v1
> 
> ># User Suyash Agarwal <syshagarwal@gmail.com>
> Shouldn't this credit the original author? ;-)

I wrote that in the commit message. Didn't know we can do it here as well.
Will just make the change. sorry
Attachment #8573325 - Attachment is obsolete: true
Attachment #8573334 - Flags: review+
Assignee: nobody → stlman
I am always around, somewhere. I just can't be around everywhere (-;

BTW. Does being the assignee mean I need to take some actions now?
(In reply to Lukasz Stelmach from comment #9)
> I am always around, somewhere. I just can't be around everywhere (-;
> 
> BTW. Does being the assignee mean I need to take some actions now?

No, nothing needs to be done :)
Keywords: checkin-needed
Comment on attachment 8573334 [details] [diff] [review]
Patch for check-in

Checked in https://hg.mozilla.org/comm-central/rev/2bc6eb521e4b

We'll consider for comm-aurora after nightly bake.
Attachment #8573334 - Flags: approval-comm-aurora?
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → Thunderbird 39.0
Comment on attachment 8573334 [details] [diff] [review]
Patch for check-in

https://hg.mozilla.org/releases/comm-aurora/rev/cd8b6a293cab
Attachment #8573334 - Flags: approval-comm-aurora? → approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.