aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/queryUpstreamBug.json24
-rw-r--r--lib/rhbzpage.js9
2 files changed, 27 insertions, 6 deletions
diff --git a/data/queryUpstreamBug.json b/data/queryUpstreamBug.json
index 3de67d0..544d526 100644
--- a/data/queryUpstreamBug.json
+++ b/data/queryUpstreamBug.json
@@ -1,10 +1,26 @@
[
{
"regexp": "thunderbird|firefox|xulrunner",
- "addr": "https://bugzilla.mozilla.org/buglist.cgi?quicksearch="
+ "addr": {
+ "url": "https://bugzilla.mozilla.org/buglist.cgi?quicksearch=",
+ "fillIn": "$$$",
+ "searchBy": "product"
+ }
+ },
+ {
+ "regexp": "nautilus|gnome.*",
+ "addr": {
+ "url": "https://bugzilla.mozilla.org/buglist.cgi?quicksearch=",
+ "fillIn": "$$$",
+ "searchBy": "product"
+ }
},
{
"regexp": "xorg-x11.*",
- "addr": "https://bugs.freedesktop.org/buglist.cgi?quicksearch=product%3Axorg+"
- }
-] \ No newline at end of file
+ "addr": {
+ "url": "https://bugs.freedesktop.org/buglist.cgi?quicksearch=",
+ "fillIn": "xorg",
+ "searchBy": "product"
+ }
+ }
+]
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index dc0b250..10090a7 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -577,9 +577,14 @@ RHBugzillaPage.prototype.setBranding = function() {
RHBugzillaPage.prototype.queryUpstream = function() {
var text = this.getSelectionOrClipboard();
if (text) {
- text = encodeURIComponent(text.trim());
var queryUpstreamBugsURLArray = this.constantData.queryUpstreamBug;
- var urlBase = util.filterByRegexp(queryUpstreamBugsURLArray, this.getComponent());
+ var searchData = util.filterByRegexp(queryUpstreamBugsURLArray, this.getComponent());
+ var urlBase = searchData.url;
+ text = searchData.searchBy+":"+searchData.fillIn+" "+text.trim();
+ if (searchData.fillIn == "$$$") {
+ text = text.replace("$$$", this.getComponent());
+ }
+ text = encodeURIComponent(text).replace("%20","+");
tabs.open({
url: urlBase + text,
inBackground: true,