aboutsummaryrefslogtreecommitdiffstats
path: root/bugzillaBugTriage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-05-12 17:41:26 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-05-12 17:41:26 +0200
commitcaa2c27429d408da9e43b30102e39881e9f34ba5 (patch)
tree419d917ae1d401a3d92a17422bd0143396de9424 /bugzillaBugTriage.js
parentd818b656fb0db9a5edd8c9bdf756fc007ba4f8fe (diff)
downloadbugzilla-triage-caa2c27429d408da9e43b30102e39881e9f34ba5.tar.gz
Clean up generalPurposeCureForAllDisease a bit and move some of its
code to separate methods.
Diffstat (limited to 'bugzillaBugTriage.js')
-rw-r--r--bugzillaBugTriage.js82
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") {