aboutsummaryrefslogtreecommitdiffstats
path: root/data/rhlib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-05-28 16:57:05 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-05-28 16:57:05 +0200
commita2a4b6ce0207bdb08f30b7d3182b4a074d50e600 (patch)
treeb4d4534bdd6dcbb941fd142c2c665abd4ec14c57 /data/rhlib/rhbzpage.js
parent4ec7f38055b0b230c55d68a208a3a537c19dfc24 (diff)
downloadbugzilla-triage-a2a4b6ce0207bdb08f30b7d3182b4a074d50e600.tar.gz
Make closing bug as UPSTREAM working again.
Actually, wholeURL must be initialized and wholeURL is string, not an object which would have host property). Fixes #102
Diffstat (limited to 'data/rhlib/rhbzpage.js')
-rw-r--r--data/rhlib/rhbzpage.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/data/rhlib/rhbzpage.js b/data/rhlib/rhbzpage.js
index 99cd276..070737e 100644
--- a/data/rhlib/rhbzpage.js
+++ b/data/rhlib/rhbzpage.js
@@ -378,12 +378,16 @@ function addClosingUpstream() {
"external_id");
if (inputBox.value.match(/^http.*/)) {
- externalBugID = getBugNoFromURL(inputBox.value);
+ wholeURL = inputBox.value;
+ // TODO this is probably midlly ineffective ... we do parseURL here,
+ // and getBugNoFromURL does it as well.
+ externalBugID = getBugNoFromURL(wholeURL);
if (externalBugID) {
inputBox.value = externalBugID;
}
// get bugzillaName and set the label
- var bugzillaName = getBugzillaName(wholeURL.host, constantData.bugzillaLabelNames);
+ var bugzillaName = getBugzillaName(parseURL(wholeURL).host,
+ constantData.bugzillaLabelNames);
selectOptionByLabel("external_id", bugzillaName);
}
else if (!isNaN(inputBox.value)) {