[Midori 2.0][Contacts] Can't import contacts without name.

RESOLVED INVALID

Status

Firefox OS
Gaia::Contacts
P2
normal
RESOLVED INVALID
4 years ago
4 years ago

People

(Reporter: sync-1, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
the latest id: Mozilla build ID: 20141019000201    FFOS: 2.0
 
 DEFECT DESCRIPTION:
  Can't import contacts without name from memory card.
 
  REPRODUCING PROCEDURES:
  1. Idle-> Contacts -> Click "+" to add two contacts(One contact add name and number and the other add number only)
  2. Contacts -> Click "Setting" option -> Export Contacts -> Memory card ->select the contact with picture -> Export
  3. Delete two new added contacts.
  4. Import Contacts -> Memory Card -> Back to contacts,there is only one contact.--KO
  
  EXPECTED BEHAVIOUR:
  Contacts without name should be imported successfully.
 
  ASSOCIATE SPECIFICATION:
 
  TEST PLAN REFERENCE:
 
  TOOLS AND PLATFORMS USED:
 
  USER IMPACT:
 
  REPRODUCING RATE: 100%
Can you upload the vCard file you got when it was exported in step 2?
Flags: needinfo?(sync-1)

Comment 2

4 years ago
(In reply to Johan Lorenzo [:jlorenzo] (QA) from comment #1)
> Can you upload the vCard file you got when it was exported in step 2?

It only one contact in the vcard file,the contact without name do not export.

In shared/js/contact2vcard.js file 261 line has the following code:

// vCard standard does not accept contacts without 'n' or 'fn' fields.
if (n === 'n:;;;;;' || !ct.name) {
  setImmediate(function() { appendVCard(''); });
  return;
}

I think we should delete these code to solve this issue.
Flags: needinfo?(sync-1)
(In reply to wuww@tcl.com from comment #2)
> // vCard standard does not accept contacts without 'n' or 'fn' fields.
The "N" field is required in vCard 2.1 and 3.0[1]. We are supporting this version so we can't remove these checks. 

[1] https://www.ietf.org/rfc/rfc2426.txt, see paragraph 3.1.2
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.