diff options
-rw-r--r-- | bugzillaBugTriage.js | 82 |
1 files changed, 45 insertions, 37 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index 35d4132..edfadb6 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -2198,6 +2198,49 @@ RHBugzillaPage.prototype.generateToolBar = function(anchor, array) { } }; +RHBugzillaPage.prototype.setBugAssigned = function(ver) { + // Now we lie completely, we just set keyword Triaged, + // this is not just plain ASSIGNED, but + // modified according to + // https://fedoraproject.org/wiki/BugZappers/Meetings/Minutes-2009-Oct-27 + // and + // http://meetbot.fedoraproject.org/fedora-meeting/2009-11-24\ + // /fedora-meeting.2009-11-24-15.11.log.html + // and + // http://meetbot.fedoraproject.org/fedora-meeting/2009-11-24\ + // /fedora-meeting.2009-11-24-15.11.log.html + // for F13 and later, ASSIGNED is "add Triaged keyword" (as well) + // for <F13 it is "add both" (ASSIGNED status and Triaged keyword) + if (!hlpr.isInList(this.maintCCAddr, this.CCList)) { + this.doc.getElementById("newcc").textContent = this.maintCCAddr; + } + if ((!this.isEnterprise()) && (ver < TriagedDistro)) { + this.selectOption("bug_status", "ASSIGNED"); + } + this.setKeyword("Triaged"); +} + +RHBugzillaPage.prototype.closeSomeRelease = function(verNo) { + // for RAWHIDE close as RAWHIDE, + // if active selection -> CURRENTRELEASE + // and put the release version to + // "Fixed in Version" textbox + // otherwise -> NEXTRELEASE + this.selectOption("bug_status", "CLOSED"); + var text = ""; + if (jetpack.selection.text) { + text = jetpack.select.text.trim(); + } + if (text.length > 0) { + this.selectOption("resolution", "CURRENTRELEASE"); + this.doc.getElementById("cf_fixed_in").value = text; + } else if (verNo === 999) { + this.selectOption("resolution", "RAWHIDE"); + } else { + this.selectOption("resolution", "NEXTRELEASE"); + } +} + /** * Generalized function for all actions * @@ -2220,24 +2263,7 @@ RHBugzillaPage.prototype.generalPurposeCureForAllDisease = function(addString, if (secondParameter === "UPSTREAM") { this.addClosingUpstream(); } else if (secondParameter === "SOMERELEASE") { - // for RAWHIDE close as RAWHIDE, - // if active selection -> CURRENTRELEASE - // and put the release version to - // "Fixed in Version" textbox - // otherwise -> NEXTRELEASE - this.selectOption("bug_status", nextState); - var text = ""; - if (jetpack.selection.text) { - text = jetpack.select.text.trim(); - } - if (text.length > 0) { - this.selectOption("resolution", "CURRENTRELEASE"); - this.doc.getElementById("cf_fixed_in").value = text; - } else if (verNo === 999) { - this.selectOption("resolution", "RAWHIDE"); - } else { - this.selectOption("resolution", "NEXTRELEASE"); - } + this.closeSomeRelease(verNo); } else if (secondParameter.length > 0) { this.selectOption("bug_status", nextState); this.selectOption("resolution", secondParameter); @@ -2256,25 +2282,7 @@ RHBugzillaPage.prototype.generalPurposeCureForAllDisease = function(addString, } this.addKeyword(secondParameter); } else if (nextState === "ASSIGNED") { - // Now we lie completely, we just set keyword Triaged, - // this is not just plain ASSIGNED, but - // modified according to - // https://fedoraproject.org/wiki/BugZappers/Meetings/Minutes-2009-Oct-27 - // and - // http://meetbot.fedoraproject.org/fedora-meeting/2009-11-24\ - // /fedora-meeting.2009-11-24-15.11.log.html - // and - // http://meetbot.fedoraproject.org/fedora-meeting/2009-11-24\ - // /fedora-meeting.2009-11-24-15.11.log.html - // for F13 and later, ASSIGNED is "add Triaged keyword" (as well) - // for <F13 it is "add both" (ASSIGNED status and Triaged keyword) - if (!hlpr.isInList(this.maintCCAddr, this.CCList)) { - this.doc.getElementById("newcc").textContent = this.maintCCAddr; - } - if ((!this.isEnterprise()) && (verNo < TriagedDistro)) { - this.selectOption("bug_status", nextState); - } - this.setKeyword("Triaged"); + this.setBugAssigned(verNo); } else if (nextState === "QUERYSEL") { this.queryForSelection(); } else if (nextState === "QUERYUP") { |