[Contacts] Change algorithm to merge "given name" and "last name" fields to preserve master values

RESOLVED FIXED

Status

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

People

(Reporter: salva, Assigned: salva)

Tracking

unspecified
x86_64
Linux
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:koi+)

Details

(Whiteboard: [u=commsapps-user c=contacts p=7])

Attachments

(1 attachment, 1 obsolete attachment)

At the same time, the fields coming from suggestions are not lost but stored in the extra positions (second, third, fourth...) of the givenName / lastName arrays:

https://wiki.mozilla.org/WebAPI/ContactsAPI#API
blocking-b2g: --- → koi?

Updated

5 years ago
Whiteboard: [u=commsapps-user c=contacts p=0]
Created attachment 796147 [details]
Algorithms for merging givenName and familyName changed.

New tests added.
Adapt and merge changed to allow specifying the master contact.
Name composition centralized to avoid code repetition.
Some libraries updated.
Attachment #796147 - Flags: review?(francisco.jordano)
Whiteboard: [u=commsapps-user c=contacts p=0] → [u=commsapps-user c=contacts p=7]
Comment on attachment 796147 [details]
Algorithms for merging givenName and familyName changed.

Hi,

seems we have some corner cases that are making the merge functionality fail. Please take a look to the comments in github.

Anyway, the work is looking pretty good :), sure solving those problems will be easy for you!

Thanks a lot Salva!
Attachment #796147 - Flags: review?(francisco.jordano) → review-
koi+ as this is part of the contacts merge stories
please add dependencies to the bug as well. Thanks
blocking-b2g: koi? → koi+
Blocks: 908207
Comment on attachment 796147 [details]
Algorithms for merging givenName and familyName changed.

Comments fixed. Can you review the code again, please?
Thank you.
Attachment #796147 - Flags: review- → review?(francisco.jordano)
Blocks: 895797
Comment on attachment 796147 [details]
Algorithms for merging givenName and familyName changed.

\o/

Working pretty nice, thanks Salva!
Attachment #796147 - Flags: review?(francisco.jordano) → review+
Master: af587d3201332a8fb0c96e5aa4c771031796a5f7
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 7

5 years ago
This bug has been backed out. Due to unneeded changes it has regressed import UI functionalities as reported by bug 912100
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 8

5 years ago
Created attachment 799359 [details]
11921.html

Pointer to GH PR 11921
Attachment #796147 - Attachment is obsolete: true
Attachment #799359 - Flags: review?(salva)
Comment on attachment 799359 [details]
11921.html

Just a little comment on GitHub, not blocking but desirable.

Thank you for your feedback. You're right. The former bug was very intrusive.
Attachment #799359 - Flags: review?(salva) → review+
Comment on attachment 799359 [details]
11921.html

I detected and error and I don't know why are the tests passing. See on GitHub.
Attachment #799359 - Flags: review+ → review-

Comment 11

5 years ago
fixed

Updated

5 years ago
Attachment #799359 - Flags: review- → review?(salva)
Comment on attachment 799359 [details]
11921.html

Only a little comment more. Not blocking.

Thank you very much :)
Attachment #799359 - Flags: review?(salva) → review+

Updated

5 years ago
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.