Closed Bug 853788 Opened 12 years ago Closed 12 years ago

[SMS] support the "full name search" use case

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:-, b2g18+ verified)

VERIFIED FIXED
blocking-b2g -
Tracking Status
b2g18 + verified

People

(Reporter: julienw, Assigned: rwaldron)

References

Details

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #852577 +++

Here is the use case :

* we have a contact named "Julien Wajsberg" (givenName is "Julien", familyName is "Wajsberg").
* in the SMS app, we begin to write "Julien" => it returns correctly the number
* then we go on "Julien " => currently, it returns nothing, because we search in each property separately
* same with the full name, or with the inverted words

The possible algorithm is to tokenize, search for each words, and return the intersection.

Possible optimizations :
- if we have 3 words or more, remove the words with 3 characters or less before searching.
- don't allow more than 5 words
Summary: Contacts API: support the "full name search" use case → [SMS] support the "full name search" use case
Is this bug dependent on bug 852577? It's not clear from https://bugzilla.mozilla.org/show_bug.cgi?id=852577#c6 if this bug will track a different implementation (that can be ready for v1.1) without the API work.
Lukas, that's the plan :)
(I mean: not depend on bug 852577 and go ahead and implement this in SMS)
Great in that case can someone confirm if this is a user story for v1.1 and thus a clear blocker?  We're past feature freeze now, is this something we can still take?
Flags: needinfo?(ffos-product)
Attached file Fix for 853788 (obsolete) (deleted) —
Attachment #729633 - Flags: review?(felash)
For now, not a blocker but something that we would consider approving for uplift.
blocking-b2g: leo? → -
I think that should be reconsidered as there is currently no way to search by full name, which is supported via a hack in the Contacts app (searches through the textContent of HTML list elements _in_ _the_ _page_). 

Imagine you had 20 contacts whose first name was Jane, FirefoxOS's messaging app will fail to find "Jane Zeddemore" if I typed "jane z". In fact, FirefoxOS's messaging app fails to find _anyone_ as soon as you add a space, ie. "jane " loses the entire list of my "jane" contacts. As a user, I would find this to be a very frustrating experience.
Rick, if we have a small enough safe patch with unit tests I'm quite confident it will be uplifted.

At this time, leo+ means "we can't ship v1.1 without this feature" and this bug does not fit in this definition according to the drivers.
Comment on attachment 729633 [details]
Fix for 853788

<meta http-equiv="refresh" content="0;URL=https://github.com/mozilla-b2g/gaia/pull/8830">
Attached file Fix for 853788 (obsolete) (deleted) —
Previous attachment was created incorrectly.
Attachment #729633 - Attachment is obsolete: true
Attachment #729633 - Flags: review?(felash)
Attachment #730134 - Flags: review?(felash)
Comment on attachment 729633 [details]
Fix for 853788

<meta http-equiv="refresh" content="0;URL=https://github.com/mozilla-b2g/gaia/pull/8830">
Attachment #729633 - Attachment filename: file_853788.txt → file_853788.html
Attachment #729633 - Attachment mime type: text/plain → text/html
Attached file Fix for 853788 (deleted) —
Apologies for all of the CC spam :(
Attachment #730134 - Attachment is obsolete: true
Attachment #730134 - Flags: review?(felash)
Attachment #730136 - Flags: review?(felash)
I don't need to have a working html file, add an empty file + the PR url as comment is enough for me ;) (for next time)
I'd agree with Julien's assessment to have this as tracking.
Flags: needinfo?(ffos-product)
Blocks: 856085
Comment on attachment 730136 [details]
Fix for 853788

r=me with the latest isArray change.

please squash and add a meaningful commit log before adding checkin-needed :)
Attachment #730136 - Flags: review?(felash) → review+
Comment on attachment 730136 [details]
Fix for 853788

after an IRC discussion, no use of isArray is necessary after all.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment on attachment 730136 [details]
Fix for 853788

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: Searching for "Dietri" or "Ayal" works but not searching for "Dietrich " (with a space at the end) or "Dietrich Ayala" or "Ayala Diet" etc.

Testing completed: Yes + several unit tests
Risk to taking this patch (and alternatives if risky): low
String or UUID changes made by this patch: none
Attachment #730136 - Flags: approval-gaia-v1?(21)
Attachment #730136 - Flags: approval-gaia-v1?(21) → approval-gaia-v1+
I was not able to uplift this bug to v1-train.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1-train, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1-train
  git cherry-pick -x -m1 7d27ab64e32d4e3ec6b3866d9358ccb0de2073c2
  <RESOLVE MERGE CONFLICTS>
  git commit
Flags: needinfo?(felash)
uplift blocked by Bug 840073 and Bug 847975
Flags: needinfo?(felash)
Sorry, bug 854413 instead of Bug 847975.
(In reply to Julien Wajsberg [:julienw] from comment #20)
> Sorry, bug 854413 instead of Bug 847975.

We should be good to land now. Adding verifyme for QA regression testing around this enhancement.
Keywords: verifyme
v1-train: 3b8ec55740a387aa79cd590a83051d423227d22d
v1.2 unaffected. Verified as fixed for v1.1.

Leo v1.1
Environmental Variables
Device: Leo v1.1 Mozilla RIL
Build ID: 20131203041431
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/617eb9d9bcc2
Gaia: 19c9ff3a46a4389e40253c97b359763243af4531
Platform Version: 18.1
Firmware Version: lge_default
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: