"Add to existing contacts" should not be available if no contacts exist

RESOLVED FIXED

Status

Firefox OS
Gaia::Contacts
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: vladan, Assigned: alberto.pastor)

Tracking

({b2g-testdriver, unagi})

unspecified
b2g-testdriver, unagi
Dependency tree / graph
Bug Flags:
in-moztrap +

Firefox Tracking Flags

(blocking-b2g:leo+, blocking-basecamp:-, b2g18+ fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Steps to reproduce:

1. Go to your call history and click on a phone number without a contact associated.

Expect: Options to call or create a new contact
Actual: "Add to existing contacts" is also available despite 0 contacts in my address book
Would take a patch for that.
blocking-basecamp: ? → -
tracking-b2g18: --- → +
Assignee: nobody → alberto.pastor

Updated

6 years ago
Duplicate of this bug: 823249

Updated

6 years ago
Component: Gaia → Gaia::Contacts
Depends on: 832936
(Assignee)

Comment 4

6 years ago
Hi Sergi!

Thanks for the patch.
In my opinion, that would hurt Dialer loading performance (requesting contacts it's not cheap) just for 1 specific case, and taking in account how critical is Dialer loading time... I would prefer requesting a contacts count only when needed, as soon as Bug 832936 is fixed.
What do you think?
Hi Alberto,

Yeah, I guess it makes sense. I was not aware that requesting contacts is expensive, specially when it looks like `find` is an async call.

Thanks for your reply!

Sergi
(Assignee)

Comment 6

5 years ago
Created attachment 726208 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8704

Pointer to Github pull-request
(Assignee)

Updated

5 years ago
Attachment #726208 - Flags: review?(l10n)
Attachment #726208 - Flags: review?(francisco.jordano)
(Assignee)

Comment 7

5 years ago
As we don't have a fast way for retrieving the number of contacts, and given the case we are talking about is going to happen not that often (when you have the contacts list empty), we prefer don't delay every request. As an alternative solution, we will show an error message when entering in contacts through the activity.
Comment on attachment 726208 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8704

Pretty clean and safe code.

r+
Attachment #726208 - Flags: review?(francisco.jordano) → review+

Comment 9

5 years ago
Comment on attachment 726208 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8704

I found that string hard to understand without context, can you add a comment before the string like:

# LOCALIZATION NOTE(noContactsActivity): Shown when using the context menu to add a number from your call list to a contact, and your contacts list is empty.

r=me with that.
Attachment #726208 - Flags: review?(l10n) → review+
(Assignee)

Comment 10

5 years ago
https://github.com/mozilla-b2g/gaia/commit/7ffcc10a695a357bee7794a84147a805b1cb0dfb
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
This patch is required to fulfill the Acceptance Criteria of the leo+ User Stories bug 838020 and 838021
blocking-b2g: --- → leo?
Please nominate patch for approval instead and we'll take it.
blocking-b2g: leo? → -
(Assignee)

Comment 13

5 years ago
Comment on attachment 726208 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8704

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 #): 
User impact if declined: User can try to add to an existing contact when the list  is empty, what will end on a "No contacts screen" and without button for adding a new one. The only option is cancel the activity but there is no feedback.
Testing completed: Unit tests passing, and manual testing. Performance tests doesn't show any loose.
Risk to taking this patch (and alternatives if risky): low risk patch, only adding a check when in an activity and the list is empty for displaying a message.
String or UUID changes made by this patch: Added a new string for the new error message. Validated by l10n@mozilla.com
Attachment #726208 - Flags: approval-gaia-v1?

Updated

5 years ago
Attachment #726208 - Flags: approval-gaia-v1? → approval-gaia-v1+
My mistake, I had missed that this is explicitly called out in the user acceptance criteria for the user story per https://bug838021.bugzilla.mozilla.org/attachment.cgi?id=727946.  Marking blocker in case of regression.
blocking-b2g: - → leo+
status-b2g18: --- → affected
Uplifted commit 7ffcc10a695a357bee7794a84147a805b1cb0dfb as:
v1-train: 6efaeb9cc32b0086c6c010487ce30a3270b2cd5e
status-b2g18: affected → fixed

Updated

5 years ago
Flags: in-moztrap?

Comment 16

5 years ago
Adding a related test case.
 - https://moztrap.mozilla.org/manage/case/8467/
Flags: in-moztrap? → in-moztrap-
That should be a + if you confirmed adding a test case or confirmed there's already coverage. - is only used if the bug doesn't make sense to have test cases for.
Flags: in-moztrap- → in-moztrap+
You need to log in before you can comment on or make changes to this bug.