Closed Bug 909201 Opened 11 years ago Closed 10 years ago

Editing names doesn't update properly

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S1 (9may)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: ajones, Assigned: robert.sajdok)

References

Details

Attachments

(3 files)

Version 1.1.0.0-prerelease 20130816041203

Steps to reproduce:

* Search for a contact my first name
* Observe a list of names
* Choose one of the names
* Click on the edit icon
* Modify the surname
* Click on Update
* Click on <

Expected results:

The name is updated on the list

Actual results:

The old name is shown
"contacts.Search" is not updated, when "mozContacts.oncontactchange" is notified.
Therefore, the name seems old.
I made the screen transition image of the search screen.
Please do a review of the user interface.("search screen")

Thanks.
Attachment #825679 - Flags: ui-review?(swilkes)
Flags: needinfo?(swilkes)
Flagging Eric to review the attachment (search list PDF).
Flags: needinfo?(swilkes) → needinfo?(epang)
Attachment #825679 - Flags: ui-review?(swilkes) → ui-review?(epang)
I am going to try fix it, please assign me to this bug.
Comment on attachment 825679 [details]
update of a search list.pdf

This looks good to me, thanks!
Attachment #825679 - Flags: ui-review?(epang) → ui-review+
Flags: needinfo?(epang)
Hi Stephany,

Please assign it to robert if the result of the review is OK.

Thanks.
Flags: needinfo?(swilkes)
For me everything is clear. I've been working on it.
Hello - Eric has given the UI review and marked it review+ so that means it is OK. Please proceed (though it sounds like you already are). Thanks!
Flags: needinfo?(swilkes)
I made my patch for this bug. I am not sure what I should do next. How to ask someone to review my patch?
https://github.com/mozilla-b2g/gaia/pull/15280
Assignee: nobody → robert.sajdok
Assigned, as per request in IRC
Status: NEW → ASSIGNED
Attachment #8367601 - Flags: review?(bkelly)
Comment on attachment 8367601 [details] [review]
Bug 909201 proposed fix.

Robert, this is a good start!  I made some comments in the Github PR about some ways we can improve the fix.

Also, I think we need a test to catch this kind of error in the future.  Can you add a new function to contacts/test/unit/view/list.js?  You should be able to copy an existing test as a start, like this:

  https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contacts/test/unit/views/list_test.js#L1088

You can trigger a search, then use doRefreshContact() to update the contact, then verify the search shows the modified contact.

The only trick will be to know when the search update is complete.  A setTimeout(func, 0) may be adequate there.  (Generally, though we try not to use timeouts when possible in tests.)

To run the tests locally, see this page:

  https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/Gaia_unit_tests?redirectlocale=en-US&redirectslug=Mozilla%2FFirefox_OS%2FPlatform%2FTesting%2FGaia_unit_tests

Please reflag me for review when your ready again.  Thanks!
Attachment #8367601 - Flags: review?(bkelly) → review-
Attachment #8367601 - Flags: review- → review?(bkelly)
Comment on attachment 8367601 [details] [review]
Bug 909201 proposed fix.

Please add a check for contacts.Search in list.js as we lazy load that functionality:

  if (contacts.Search) {
    contacts.Search.updateSearchList();
  }

You can see this is currently making the marionette tests fail.

Also, please squash your commits into a single commit.  You can do this with:

  git rebase -i master

See here for more information on doing that:

  http://davidwalsh.name/squash-commits-git

Also, please provide a better commit message.  It should follow the form:

  Bug <bug number>: <description of change>

When we finally merge it to master we then add r=<reviewer> to the message.

Please reflag me for review with those changes.  Should be a quick r+ after that assume the travis tests all pass.

Thanks for you work on this!
Attachment #8367601 - Flags: review?(bkelly)
Attachment #8367601 - Flags: review?(bkelly)
Comment on attachment 8367601 [details] [review]
Bug 909201 proposed fix.

Looks good.  Thanks Robert!
Attachment #8367601 - Flags: review?(bkelly) → review+
Merged to master:

  https://github.com/mozilla-b2g/gaia/commit/41da6e3ce207a0eb444ca8e94ccfaeab03577ae0
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Reverted for gaia-unit test failures:
https://tbpl.mozilla.org/php/getParsedLog.php?id=36144869&tree=B2g-Inbound

https://github.com/mozilla-b2g/gaia/commit/cb1e82417b313ac19372b0d9dd209ca40e236508

Ben, please test locally before merging to master :-)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Looks like a case of travis running with multiple tests in a sandbox vs tbpl using separate sandboxes.  Our main method of running tests locally matches travis, so it would not have found this.

I really wish we would make travis run things in their own sandboxes. :-(
Ugh.  We have enabledSearch() with searchEnabled flag and the enterSearchMode() with inSearchMode flag.  This seems... confusing.  Francisco, do you think we should unify these?

If not, I think we should have this code check inSearchMode in addition to searchEnabled.
Flags: needinfo?(francisco.jordano)
Definitely, let's merge them, we have same meaning. In fact the |enableSearch| function doesn't look to be used:

./js/views/search.js
370:  var enableSearch = function enableSearch() {
538:    'enableSearch': enableSearch,

./test/unit/mock_contacts_search.js
13:  'enableSearch': function() {},
Flags: needinfo?(francisco.jordano)
Is this already merged?

Oh, it was back out!

Is that the case?
Per comment 21 nominating this bug to v1.5?
blocking-b2g: --- → 1.5?
(In reply to Francisco Jordano [:arcturus] from comment #20)
> Is this already merged?
> 
> Oh, it was back out!
> 
> Is that the case?

Correct.  The patch just needs the check against |searchEnabled| to look at |inSearchMode| instead.
blocking-b2g: 1.5? → backlog
1.5+ to align with bug 955972
blocking-b2g: backlog → 1.5+
Hi Robert,

you up for applying the needed changes?
Flags: needinfo?(robert.sajdok)
If you need to do it quickly then remove me from this bug otherwise please give me more time on it.
Flags: needinfo?(robert.sajdok)
Attached file Proposed fix.
Attachment #8402225 - Flags: review?(bkelly)
Status: REOPENED → ASSIGNED
Comment on attachment 8402225 [details] [review]
Proposed fix.

Thanks for following up on this for us Robert!  Looks good and I verified it works on my device.
Attachment #8402225 - Flags: review?(bkelly) → review+
Merged to master:

  https://github.com/mozilla-b2g/gaia/commit/8f5a447f5e11af28885be8b2c7210979e6ed171f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
This patch is missing new tests. Can Robert or Ben explain why it was landed without no new tests?
(In reply to Anthony Ricaud (:rik) from comment #30)
> This patch is missing new tests. Can Robert or Ben explain why it was landed
> without no new tests?

Don't blame Robert, this was my call.

Normally I ask for tests, but have noticed people stop contributing to the bug when I do that.  I made the decision here that we had reasonable coverage already and not throwing unnecessary roadblocks up for a contributor was more important.

Feel free to back out if you disagree.
+1 to Ben's comment.

In this specific case the unit test for the bug are not simple, I worked on them for an alternative version in bug 955972, but we decided to land this one.

I just created bug 993406 to follow up just with the unit test for this, again needed since this is a 1.5+ bug.

Cheers.
(In reply to Ben Kelly [:bkelly] from comment #31)
> Don't blame Robert, this was my call.
That also looks like the correct path to me but we should be explicit about it (if only to inform the contributor about our landing policies). I've marked the test bug as a blocker for tracking purposes.
Depends on: 993406
See Also: 993406
Target Milestone: --- → 2.0 S1 (9may)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: