Closed Bug 1138377 Opened 5 years ago Closed 5 years ago

[B2G][Contacts] Unable to view some fields from a downloaded vcf file

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:2.2+, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.2 S7 (6mar)
blocking-b2g 2.2+
Tracking Status
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: noemi, Assigned: hola)

References

Details

Attachments

(3 files)

Attached image Test_Case_Preview.png
STRs:
1. E-mail with .vcf file is received in FxOS device from an IOS (8.0) device
2. Click on the received vcard attachment to download the corresponding .vcf file
3. After completing the Download, click on the notification

Actual Result: The vcard is opened via Contacts app, but e-mail address and address fields are not shown in the preview (see "Test_Case_Preview.png" image attached)


Expected Result: The vcard is opened via Contacts app and all the contact fields are properly shown


Environmental Variables:
Device: Flame Master
Build ID: 20150302073244    
Gaia: cf3b761
Gecko: 75fc721
Platform Version: 39.0a1 (Master)
Firmware Version: v18D
Attached file Test Case.vcf
.vcf file
Assignee: nobody → hola
Component: Gaia::E-Mail → Gaia::Contacts
Summary: [B2G][Email] Unable to view some fields from a downloaded vcf file → [B2G][Contacts] Unable to view some fields from a downloaded vcf file
No longer blocks: 825318
See Also: → 1007932
Comment on attachment 8571431 [details] [review]
[gaia] ADLR-es:vcard-groups > mozilla-b2g:master

Problem caused by grouping properties. I learned that Apple vCards use property grouping a lot, mainly to group a standard property with a non-standard property that categorizes the first one instead of using standard types. Since it's a proprietary implementation, it's really difficult to know how they are doing it to be able to cover all the cases.

The patch just makes the vCard reader component to forget about groups. The effect is that standard properties are correctly read, even when grouped, and non-standard ones are ignored. This solves the bug, showing email and address that were previously missing, but since the reader ignores custom properties, some information like mail type could be lost in the process when it's stated in the file in a non-standard way, like Apple does.
Attachment #8571431 - Flags: review?(jmcf)
Comment on attachment 8571431 [details] [review]
[gaia] ADLR-es:vcard-groups > mozilla-b2g:master

handing over the review to Sergi, as he developed the vCard parsing code.
Attachment #8571431 - Flags: review?(jmcf) → review?(sergi.mansilla)
Hi Adrian,

can we add a tiny unit test for this?

Thanks!
Good idea, I'm on it!
Unit test for this kind of vCards added to the PR. We just need to wait for Sergi to review it.

Thanks!
See Also: → 825318
Comment on attachment 8571431 [details] [review]
[gaia] ADLR-es:vcard-groups > mozilla-b2g:master

Looks good, thanks Adrián!
Attachment #8571431 - Flags: review?(sergi.mansilla) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S7 (6mar)
Comment on attachment 8571431 [details] [review]
[gaia] ADLR-es:vcard-groups > mozilla-b2g:master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): vCard reader component
[User impact] if declined: Parsing vCards from many providers (iOS, Gmail...) will ignore some fields due to being grouped. Right now our vCard reader doesn't support grouped properties in vCard files.
[Testing completed]: Unit test included.
[Risk to taking this patch] (and alternatives if risky): Low, small change and tests provided. The alternative is to keep ignoring some fields from some vCards.
[String changes made]: None.
Attachment #8571431 - Flags: approval-gaia-v2.2?
(In reply to Adrián de la Rosa from comment #10)
> Comment on attachment 8571431 [details] [review]
> [gaia] ADLR-es:vcard-groups > mozilla-b2g:master
> 
> [Approval Request Comment]
> [Bug caused by] (feature/regressing bug #): vCard reader component
> [User impact] if declined: Parsing vCards from many providers (iOS,
> Gmail...) will ignore some fields due to being grouped. Right now our vCard
> reader doesn't support grouped properties in vCard files.
> [Testing completed]: Unit test included.
> [Risk to taking this patch] (and alternatives if risky): Low, small change
> and tests provided. The alternative is to keep ignoring some fields from
> some vCards.
> [String changes made]: None.

just adding that the current flow already available in 2.2 for importing contacts from vcard via Messaging app is affected by this issue. Thanks!
Checked with latest master build and it's working as expected, I am able to see the e-mail and address fields of the vcard when it's received via e-mail or MMS

Environmental variables:
Flame 3.0
BuildId: 20150308082154
Gecko: d5d934b
Gaia: 373c9dd
Platform version: 39.0a1
Firmware Version: v18D
Nominating to 2.2.

Right now in 2.2 we are able to see the received vcard (via messaging or e-mail app) without e-mail address and address fields, upifting this we will able to see all the fields and have the functionality completed.
blocking-b2g: --- → 2.2?
blocking-b2g: 2.2? → 2.2+
Attachment #8571431 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
This issue is verified fixed on Flame 2.2 and 3.0. As opposed to bug behavior shown at comment 0's screenshot, now when user taps to open the attached .vcf file, they're being taken to an Add Contact screen with name, home & work phone numbers, email address, home address, and birthday pre-filled on screen. User can tap on Done button to add this contact and all the information is saved.

Device: Flame 3.0
BuildID: 20150511010202
Gaia: 6089234ace8b294a8feef064387604bae16254e3
Gecko: d8420a541d1c
Gonk: 040bb1e9ac8a5b6dd756fdd696aa37a8868b5c67
Version: 40.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:40.0) Gecko/40.0 Firefox/40.0

Device: Flame 2.2
BuildID: 20150511002500
Gaia: 528ef60e7cda09ad43478065f5d33bda398fbeb7
Gecko: 8d04cc085cf5
Gonk: ab265fb203390c70b8f2a054f38cf4b2f2dad70a
Version: 37.0 (2.2) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.