Merge lp:~benji/launchpad/bug-809511 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Gary Poster |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13591 |
Proposed branch: | lp:~benji/launchpad/bug-809511 |
Merge into: | lp:launchpad |
Diff against target: |
196 lines (+155/-5) 3 files modified
lib/lp/code/javascript/branch.bugspeclinks.js (+43/-5) lib/lp/code/javascript/tests/test_bugspeclinks.html (+28/-0) lib/lp/code/javascript/tests/test_bugspeclinks.js (+84/-0) |
To merge this branch: | bzr merge lp:~benji/launchpad/bug-809511 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gary Poster (community) | Approve | ||
Review via email: mp+70219@code.launchpad.net |
Commit message
[r=gary][bug=809511] use a heuristic to guess the likely bug ID from the branch name when associating
Description of the change
This branch addressed bug 809511 which is about adding a heuristic to
the "Link a bug report" functionality on branch pages. The heuristic
looks for potential bug numbers in the branch name and if found
pre-fills the bug number field with it and then selects the field
contents so the user can easily remove the number if the guess was
wrong.
Huw and I talked about this in Dublin so I guess that counts as both a
pre-implementation discussion and UI approval.
Tests are in the new test_bugspeclin
lib/lp/
QA should be to visit a branch with a bug number in the name and click
"Link a bug report" and verify that:
- the bug number is provided
- it is selected
- the field has focus
- typing something replaces the guessed ID
- not typing anything and clicking the OK button works
Also, a branch with no ID in its name should be visited and it should be
verified that:
- the field is empty
- the field has focus
- typing something works
- entering a bug ID and clicking the OK button works
After fixing some pre-existing lint the make lint report is clean.
This is cool, Benji! Thank you for thinking of it and doing it.
Feel free to ignore this bikeshed color, but I suggest that you make the digit limit for a bug number 5, not 6. We do have branches to fix older bugs. Launchpad has three five digit bugs that are still open (https:/ /bugs.launchpad .net/launchpad/ +bugs). Ubuntu has one (https:/ /bugs.launchpad .net/ubuntu/ +bugs). It's not a big deal, but my suggestion.
Did you consider updating "Y.DOM. byId('field. bug')" to "Y.one( '#field. bug")"?
Other than that, looks good. Cool to see the JS tests gradually growing.