From: Kristian Kræmmer Nielsen Date: Mon, 8 Dec 2008 16:11:36 +0000 (+0100) Subject: Added lookup bugzilla bug number and auto-enable on bugzilla site X-Git-Url: https://git.jkkn.net/?a=commitdiff_plain;h=1b8c499738a3d2fd5a0c32ff1f9a3dc2c6496111;p=tv2developer Added lookup bugzilla bug number and auto-enable on bugzilla site --- diff --git a/content/quickbox.js b/content/quickbox.js index 708eeb9..42bd941 100644 --- a/content/quickbox.js +++ b/content/quickbox.js @@ -247,6 +247,7 @@ var TV2DeveloperQuickBox = { case 'go-content-id': case 'go-userid': case 'go-username': + case 'go-bugzilla': auto_action = cur_action.id; break; default: @@ -307,6 +308,7 @@ var TV2DeveloperQuickBox = { case 'go-content-id': case 'go-ttv-page': case 'go-userid': + case 'go-bugzilla': // find longest id in entered url var max_len = 0; var cur_id; @@ -320,8 +322,10 @@ var TV2DeveloperQuickBox = { validState = false; longest_id = '?'; } - action_uses_opdatering = true; - site = (action == 'go-userid' ? 'login' : 'i2'); + if (action != 'go-bugzilla') { + action_uses_opdatering = true; + site = (action == 'go-userid' ? 'login' : 'i2'); + } break; case 'go-pdolog': php4 = false; // not allowed @@ -355,6 +359,14 @@ var TV2DeveloperQuickBox = { // Just assume a username was entered uri = '/opslag.php?username=' + go_username; break; + case 'go-bugzilla': + // Use longest_id as bugzilla number + uri = '/show_bug.cgi?format=multiple&id=' + longest_id; + protocol='http'; + sitetype='webroot'; + site = 'bugzilla'; + php4 = false; + break; case 'go-node': uri = '/tool/node/?id=' + longest_id; break; @@ -481,6 +493,7 @@ var TV2DeveloperQuickBox = { _reg_viewcvsviewsource: /^\?(?:.*&)?view=markup(?:&|#|$)/, _reg_fromi2if: /^http:\/\/i2\.(?:[^.]+\.)?opdatering\.(?:(?:test|snapshot)\.)?tv2\.dk\/(tango\/(entry|requeue|dynamic)|tool\/pdo_log\/frameset)\.php.*?(?:\?|&)url=([^&]+)/, _reg_fromloginif: /^http:\/\/login\.(?:([^.]+)\.)?opdatering\.(?:(test|snapshot)\.)?tv2\.dk\/opslag\.php.*?(?:\?|&)(user_id|username)=([^&]+)/, + _reg_frombugzilla: /^http:\/\/bugzilla\.tv2\.dk\/(show_bug.cgi.*?(?:\?|&)id=([0-9]+))?/, _extractURL: function(url) { var action = 'go-site'; @@ -533,6 +546,17 @@ var TV2DeveloperQuickBox = { } } + /* Extract from bugzilla site */ + var bugzillaif = this._reg_frombugzilla.exec(url); + if (bugzillaif) { + action = 'go-bugzilla'; + if (bugzillaif[2]) { + url = bugzillaif[2]; + } else { + url = ''; + } + } + /* Extract link from ViewCVS site */ var fromviewcvs = this._reg_fromviewcvs.exec(url); if (fromviewcvs) { diff --git a/content/quickbox.xul b/content/quickbox.xul index 8e05e50..f941b6f 100644 --- a/content/quickbox.xul +++ b/content/quickbox.xul @@ -80,6 +80,7 @@ + diff --git a/locale/da-DK/tv2developer.dtd b/locale/da-DK/tv2developer.dtd index 1a59b2d..8fdecbd 100644 --- a/locale/da-DK/tv2developer.dtd +++ b/locale/da-DK/tv2developer.dtd @@ -86,9 +86,12 @@ + + + - + diff --git a/locale/en-US/tv2developer.dtd b/locale/en-US/tv2developer.dtd index 97d9019..589c74a 100644 --- a/locale/en-US/tv2developer.dtd +++ b/locale/en-US/tv2developer.dtd @@ -85,9 +85,12 @@ + + + - + diff --git a/webroot/index.html b/webroot/index.html index 8fe9549..016ac89 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -97,6 +97,7 @@
  • Genkender URL angivet som parameter i fleste i2-interfaces
  • Ved ViewCVS genkendes specielle sites så som globals og specielle mapper så som inc, brug dobbelt slash (//) efter projektnavn for at undgå dette.
  • Slå TV 2 Login brugere op pr. navn eller id
  • +
  • Slå Bugzilla opgave op