Closed Bug 784099 Opened 12 years ago Closed 12 years ago

Contacts API is not saving contacts

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: alberto.pastor, Assigned: gwagner)

References

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1

Steps to reproduce:

Go to contacts app, and try to save a contact


Actual results:

givenNAme, familyName or org are successfully saved but tel,email, address or notes aren't.


Expected results:

The Contact should be fully saved.
Blocks: 782136
Status: UNCONFIRMED → NEW
blocking-basecamp: --- → ?
Ever confirmed: true
Assignee: nobody → anygregor
blocking-basecamp: ? → +
Attached patch patch (obsolete) — Splinter Review
We should expose all contact fields now but contacts are still not showing in the contacts app.

Alberto: I added a phone number and put some dumps into the gaia code. 
I can still get it in contacts.js line 412. I can still read the tel[0].value from the contact. Did you change anything in the gaia code as well?
Attachment #653602 - Flags: review?(fabrice)
I don't really know what's going on but I found the problem.
For.. in doesn't work: https://github.com/mozilla-b2g/gaia/blob/master/apps/contacts/js/contacts.js#L411

But it works for adr:
for (var i = 0; i < contact.adr.length; i++) {

Could you change it to the other for loop until we fix it?
Gregor, I think the main issue was saving the contacts, not displaying them. Some people with prepoludated data hadn't problems to display it but for update it.

Could you check we can successfully save new contacts (all the fields) using UI Test imports?

Thanks!
Depends on: 784228
(In reply to Alberto Pastor from comment #3)
> Gregor, I think the main issue was saving the contacts, not displaying them.
> Some people with prepoludated data hadn't problems to display it but for
> update it.
> 
> Could you check we can successfully save new contacts (all the fields) using
> UI Test imports?
> 
> Thanks!


It works for me now with this patch and the "for in" workaround for email and tel. Adr. always worked and I still wonder why. Maybe we don't need this patch and we only have to fix bug 784228. Mrbkap?
Attachment #653602 - Flags: review?(fabrice) → review+
Without this patch and today's m-c is sill not working. I'm trying to store the contacts from the UI Test app, and it works, but when I debug the fields that arrive from the DB, not tel, adr, or email are stored. If I try to edit a contact only Name, surname or company work.

I wouldn't say this bug is caused by the |for var| error (at least, not only because of that) as we are not using that when storing the contacts.

Any other idea?
Attached patch rebased versionSplinter Review
Attachment #653602 - Attachment is obsolete: true
Attachment #654265 - Flags: review+
Attachment #654265 - Attachment is patch: true
https://hg.mozilla.org/mozilla-central/rev/cc589462f4ca
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: