aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--bugzillaBugTriage.js27
2 files changed, 14 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index 63a02c3..b25c15b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
*~
-.project
-.settings/
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index 67fe8d5..f0a5d59 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -627,7 +627,6 @@ function BZPage(doc) {
this.product = this.getOptionValue("product");
this.component = this.getOptionValue("component");
this.version = this.getVersion();
- this.defaultAssignee = this.setDefaultAssignee();
this.title = this.doc.getElementById("short_desc_nonedit_display").textContent;
this.CCList = this.getCCList();
@@ -789,10 +788,15 @@ BZPage.prototype.changeAssignee = function(newAssignee) {
if (newAssignee === null) {
this.doc.getElementById("set_default_assignee").removeAttribute(
"checked");
+ return ;
}
-
- if (newAssignee == "default" && this.defaultAssignee) {
- newAssignee = this.defaultAssignee;
+
+ if (this.getDefaultAssignee) {
+ let defAss = this.getDefaultAssignee();
+ console.log("defAss = " + defAss);
+ if (newAssignee == "default" && defAss) {
+ newAssignee = defAss;
+ }
}
if (newAssignee) {
@@ -1302,6 +1306,9 @@ BZPage.prototype.setUpLoggingButtons = function() {
*/
BZPage.prototype.addToCCList = function(who) {
console.log("who = " + who);
+ if (!who) {
+ return ;
+ }
if (who == "self") {
this.doc.getElementById("addselfcc").checked = true;
} else {
@@ -1359,6 +1366,7 @@ RHBugzillaPage = function(doc) {
// END OF CONSTANTS
// Prepare for query buttons
+ // FIXME getting null for commentArea sometimes
let commentArea = doc.getElementById("comment_status_commit");
let brElementPlacer = commentArea.getElementsByTagName("br")[0];
brElementPlacer.setAttribute("id","brElementPlacer_location");
@@ -1393,6 +1401,7 @@ RHBugzillaPage = function(doc) {
this.XorgLogAttListIndex = 0;
this.attachments = this.getAttachments();
this.markBadAttachments();
+ this.setDefaultAssignee();
// Dig out backtrace
this.btSnippet = "";
@@ -1441,7 +1450,6 @@ RHBugzillaPage.prototype.getDefaultAssignee = function() {
this.component).toLowerCase();
}
-
/**
* Set default assignee
*
@@ -1451,6 +1459,7 @@ RHBugzillaPage.prototype.getDefaultAssignee = function() {
RHBugzillaPage.prototype.setDefaultAssignee = function() {
this.defaultAssignee = this.getDefaultAssignee();
let defAss = this.defaultAssignee;
+ console.log("defAss = " + defAss);
// Add setting default assignee
if ((defAss.length > 0) && (defAss !== this.getOwner())) {
@@ -2400,14 +2409,6 @@ RHBugzillaPage.prototype.markBugTriaged = function() {
// for <F13 it is "add both" (ASSIGNED status and Triaged keyword)
let ver = this.getVersion();
let assignee = this.getOwner();
- console.log("assignee = " + assignee);
- console.log("CCList = " + this.CCList);
- console.log("component = " + this.getOptionValue("component"));
- let defBugMaint = this.getDefaultBugzillaMaintainer(this.getOptionValue("component"))
- console.log("default bugzilla maintainer = " + defBugMaint);
- if ((!hlpr.isInList(assignee,defBugMaint)) && (!hlpr.isInList(assignee, this.CCList))) {
- this.addToCCList(assignee);
- }
if ((!this.isEnterprise()) && (ver < TriagedDistro)) {
console.log("setting ASSIGNED");
this.selectOption("bug_status", "ASSIGNED");