Merge lp:~wallyworld/launchpad/picker-unassign-link-803996 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13407 |
Proposed branch: | lp:~wallyworld/launchpad/picker-unassign-link-803996 |
Merge into: | lp:launchpad |
Diff against target: |
198 lines (+15/-149) 2 files modified
lib/lp/app/javascript/picker/picker.js (+1/-1) lib/lp/app/javascript/picker/tests/test_personpicker.js (+14/-148) |
To merge this branch: | bzr merge lp:~wallyworld/launchpad/picker-unassign-link-803996 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+67710@code.launchpad.net |
Commit message
[r=sinzui][bug=803996] Ensure picker assign/remove links are shown correctly after a search when the picker is reopened.
Description of the change
After using the person picker to perform a search and assign someone to a bug, the "Remove assignee" and "Assign Me" links would disappear. These links are supposed to disappear when a search is done and the results displayed. But they should reappear when the picker is closed after a result is selected.
== Implementation ==
Turned out to be a trivial fix. The picker _clear() function was doing this:
this.set(RESULTS, [{}]);
The results were "cleared" but the array still had a length of 1 . Hence the logic to show/hide the links thought the picker still was displaying results. The logic was changed to
this.set(RESULTS, []);
Also, there were a bunch of duplicate tests in test_personpicker, left over from a previous rollback. These were deleted since they live in test_pickerpatc
== Tests ==
All picker related yui tests pass. A new test was added also for the specific bug: test_buttons_
The picker was tested also by running lp locally.
== Lint ==
jslint: 2 files to lint.
jslint: No problem found in '/home/
jslint: No problem found in '/home/
Thank your for this fix.