Closed
Bug 896060
Opened 11 years ago
Closed 11 years ago
[contacts] trim whitespaces at start or end of constructed names provided to other apps, e.g. if firstname or lastname is empty
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aryx, Assigned: mihai)
References
Details
Attachments
(1 file)
From bug 893579: Unagi with Gaia 1.1.0.0-prerelease 20130714070208 When replying to a mail from a stored contact whose firstname or lastname is empty, there will be two whitespaces between {{name}} and 'wrote' in the reply. Something like that is going to affect other consumers of mozContacts too.
Assignee | ||
Comment 1•11 years ago
|
||
Contact names were generated when saving a contact (i.e. in the contact form) by concatenating the givenName with the familyName, however, the whitespace between them was still added if one of the names was empty. This patch fixes that.
Attachment #791907 -
Flags: review?(etienne)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mihai
Comment 2•11 years ago
|
||
Comment on attachment 791907 [details]
Pull Request #11591 - Avoid whitespaces in contact names
Forwarding to Ben, Francisco tells me he's a good contacts app reviewer :)
Attachment #791907 -
Flags: review?(etienne) → review?(bkelly)
Comment 3•11 years ago
|
||
This change looks good to me, but it would be nice to have a unit test. Mihai, can you add a test case to contacts_form_test.js?
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #3) > This change looks good to me, but it would be nice to have a unit test. > Mihai, can you add a test case to contacts_form_test.js? Hi Ben, just updated the PR with tests for contact name generation. Let me know if it looks good now.
Flags: needinfo?(bkelly)
Comment 5•11 years ago
|
||
Comment on attachment 791907 [details]
Pull Request #11591 - Avoid whitespaces in contact names
Looks good! Thanks for adding the tests.
Assuming we can get travis to pass the contacts tests (there have been persistent errors in dialer and system), then I think this is good to land. I just restarted the travis build to see if it will run.
Attachment #791907 -
Flags: review?(bkelly) → review+
Comment 6•11 years ago
|
||
Looks like travis is having issues. Trying to run them locally now. Note, you will need to rebase since bug 905771 landed.
Flags: needinfo?(bkelly)
Comment 7•11 years ago
|
||
Ok. I verified the tests run locally since travis is having problems today. I say go ahead and land after rebasing. Thanks again!
Assignee | ||
Comment 8•11 years ago
|
||
Thanks for the review, Ben! Landed on master: https://github.com/mozilla-b2g/gaia/commit/bfe4868321b006115076fba520a4745206ed905f Note: the unit tests for contact form are currently not run because of the refactoring brought by the patch for bug 905771, for which I have filed bug 907459.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•