diff options
-rw-r--r-- | bugzillaBugTriage.js | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index ded744d..f19a40e 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -1295,62 +1295,6 @@ BZPage.prototype.getCCList = function() { return outCCList; }; -/** - * - */ -BZPage.prototype.pasteBacktraceInComments = function() { - // FIXME This paragraph looks suspicous ... what is it? - // Does it belong to this function? - let notedLabel = this.doc.querySelector("label[for='newcc']"); - while (notedLabel.firstChild) { - let node = notedLabel.removeChild(notedLabel.firstChild); - notedLabel.parentNode.insertBefore(node, notedLabel); - } - notedLabel.parentNode.removeChild(notedLabel); - - let abrtQueryURL = "https://bugzilla.redhat.com/buglist.cgi?" - + "cmdtype=dorem&remaction=run&namedcmd=all%20NEW%20abrt%20crashes&sharer_id=74116"; - - let mainTitle = this.doc - .getElementsByClassName("bz_alias_short_desc_container")[0]; - let abrtButton = this.doc.createElement("a"); - abrtButton.setAttribute("accesskey", "a"); - abrtButton.setAttribute("href", abrtQueryURL); - abrtButton.textContent = "Abrt bugs"; - mainTitle.appendChild(abrtButton); - - if (this.idContainsWord("cf_devel_whiteboard", 'btparsed')) { - this.addStuffToTextBox('status_whiteboard', 'btparsed'); - } - - if (!(this.isTriaged() || this.idContainsWord("status_whiteboard", - 'btparsed'))) { - let btAttachments = this.attachments - .filter(function(att, idx, arr) { - return (/backtrace/.test(att[0])); - }); - // TODO we need to go through all backtrace attachments, but - // just the first one will do for now, we would need to do async - // parsing - btAttachments.forEach(function(x) { - attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" - + x[1]; - console.log("attURL = " + attURL); - console.log("btSnippet = " + this.btSnippet); - if (!this.btSnippet) { - let btRaw = hlpr.loadText(attURL, function(ret) { - this.btSnippet = this.parseBacktrace(ret); - if (this.btSnippet) { - this.addStuffToTextBox("comment", this.btSnippet); - this.addStuffToTextBox("status_whiteboard", - "btparsed"); - } - }, this); - } - }, this); - } -}; - // ==================================================================================== // MozillaBugzilla object @@ -1720,6 +1664,62 @@ RHBugzillaPage.prototype.ProfessionalProducts = [ /** * */ +RHBugzillaPage.prototype.pasteBacktraceInComments = function() { + // FIXME This paragraph looks suspicous ... what is it? + // Does it belong to this function? + let notedLabel = this.doc.querySelector("label[for='newcc']"); + while (notedLabel.firstChild) { + let node = notedLabel.removeChild(notedLabel.firstChild); + notedLabel.parentNode.insertBefore(node, notedLabel); + } + notedLabel.parentNode.removeChild(notedLabel); + + let abrtQueryURL = "https://bugzilla.redhat.com/buglist.cgi?" + + "cmdtype=dorem&remaction=run&namedcmd=all%20NEW%20abrt%20crashes&sharer_id=74116"; + + let mainTitle = this.doc + .getElementsByClassName("bz_alias_short_desc_container")[0]; + let abrtButton = this.doc.createElement("a"); + abrtButton.setAttribute("accesskey", "a"); + abrtButton.setAttribute("href", abrtQueryURL); + abrtButton.textContent = "Abrt bugs"; + mainTitle.appendChild(abrtButton); + + if (this.idContainsWord("cf_devel_whiteboard", 'btparsed')) { + this.addStuffToTextBox('status_whiteboard', 'btparsed'); + } + + if (!(this.isTriaged() || this.idContainsWord("status_whiteboard", + 'btparsed'))) { + let btAttachments = this.attachments + .filter(function(att, idx, arr) { + return (/backtrace/.test(att[0])); + }); + // TODO we need to go through all backtrace attachments, but + // just the first one will do for now, we would need to do async + // parsing + btAttachments.forEach(function(x) { + attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" + + x[1]; + console.log("attURL = " + attURL); + console.log("btSnippet = " + this.btSnippet); + if (!this.btSnippet) { + let btRaw = hlpr.loadText(attURL, function(ret) { + this.btSnippet = this.parseBacktrace(ret); + if (this.btSnippet) { + this.addStuffToTextBox("comment", this.btSnippet); + this.addStuffToTextBox("status_whiteboard", + "btparsed"); + } + }, this); + } + }, this); + } +}; + +/** + * + */ RHBugzillaPage.prototype.markBadAttachments = function() { let badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ]; |