Merge lp:~kfogel/launchpad/481324-ignore-bugnum-trailing-whitespace into lp:launchpad

Proposed by Karl Fogel
Status: Merged
Approved by: Karl Fogel
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~kfogel/launchpad/481324-ignore-bugnum-trailing-whitespace
Merge into: lp:launchpad
Diff against target: 12 lines (+1/-1)
1 file modified
lib/canonical/launchpad/javascript/bugs/bugtask-index.js (+1/-1)
To merge this branch: bzr merge lp:~kfogel/launchpad/481324-ignore-bugnum-trailing-whitespace
Reviewer Review Type Date Requested Status
Abel Deuring (community) Approve
Review via email: mp+21708@code.launchpad.net

Description of the change

Ignore whitespace around the bug number entered when marking a bug as a duplicate.

(Does this need its own test?)

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/javascript/bugs/bugtask-index.js'
2--- lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2010-03-03 00:38:38 +0000
3+++ lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2010-03-22 11:57:32 +0000
4@@ -371,7 +371,7 @@
5
6 // Set the new duplicate link on the bug entry.
7 var new_dup_url = null;
8- var new_dup_id = data['field.duplicateof'][0];
9+ var new_dup_id = Y.Lang.trim(data['field.duplicateof'][0]);
10 if (new_dup_id !== '') {
11 var self_link = lp_bug_entry.get('self_link');
12 var last_slash_index = self_link.lastIndexOf('/');