Closed Bug 1032871 Opened 10 years ago Closed 10 years ago

[Contacts] There is no way to pick a contact with filter 'webcontacts/contact'

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.0, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.0 S5 (4july)
feature-b2g 2.0
Tracking Status
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: borjasalguero, Assigned: borjasalguero)

References

Details

(Whiteboard: ft:loop)

Attachments

(1 file)

Contacts App offers 3 ways for picking a Contact:
- webcontacts/tel: Pick a contact with 1 or more phone numbers
- webcontacts/mail: Pick a contact with 1 or more emails
- webcontacts/contact: Pick a contact without a filter, just the contact.

However, last one is not working properly as It was used in the past as main 'pick' activity. However, for third party apps and other privileged apps as Loop, we need a way to pick a raw contact as it is, without considering a pre-filter.
Assignee: nobody → borja.bugzilla
Currently, 'webcontacts/contact' returns an Object with just name & phone number, which is previously selected through the activity.
Attached file Pull Request
Attachment #8448810 - Flags: feedback?(francisco)
feature-b2g: --- → 2.0
Whiteboard: ft:loop
Comment on attachment 8448810 [details] [review]
Pull Request

You are changing the public api here.

I'm sure we have apps expecting just the current data and we will breaking them if we apply this change.

I would suggest to keep the current behaviour, and add an extra parameter, to the web activity to force the return of the whole contact.
Attachment #8448810 - Flags: feedback?(francisco) → feedback-
Comment on attachment 8448810 [details] [review]
Pull Request

After talking with Francisco, here the final solution. Keeping previous compatibility and adding an extra param in order to retrieve the raw contact. Tests added.
Attachment #8448810 - Flags: review?(francisco)
Comment on attachment 8448810 [details] [review]
Pull Request

Nice work!
Attachment #8448810 - Flags: review?(francisco)
Attachment #8448810 - Flags: review+
Attachment #8448810 - Flags: feedback-
Comment on attachment 8448810 [details] [review]
Pull Request

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): When requesting a 'webcontacts/contact' we were returning a non-mozContact structure.
[User impact] if declined: Loop or any other app which needs the full contact regardless if it has phone numbers or not is not going to work.
[Testing completed]:
[Risk to taking this patch] (and alternatives if risky): There is no risk. After talking with Francisco, we are keeping the compatibility with previous activity requests. If we want to get the whole mozContact, we need to add an extra param called 'fullContact' equal true.
So this patch is keeping the previous behaviour, and we are just adding an optional param for the apps which need this functionality working.
[String changes made]: No
Attachment #8448810 - Flags: approval-gaia-v2.0?
Attachment #8448810 - Flags: approval-gaia-v2.0? → approval-gaia-v2.0+
Hi Ryan, sorry for bothering you. If it's possible, could you be so kind of speeding up the uplifting of this patch to 2.0? 
QA is starting to test Loop application on 2.0 and we need this patch in this release to continue with the test run.
Thanks a lot!
Flags: needinfo?(ryanvm)
(In reply to Maria Angeles Oteo (:oteo) from comment #8)
> Hi Ryan, sorry for bothering you. If it's possible, could you be so kind of
> speeding up the uplifting of this patch to 2.0? 
> QA is starting to test Loop application on 2.0 and we need this patch in
> this release to continue with the test run.
> Thanks a lot!

The US was on holiday on Friday. I'm working through the backlog today.
Flags: needinfo?(ryanvm)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: