From 0e0acd394b17f44440a573baadc7272fe8ce0404 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Fri, 20 Nov 2009 02:58:06 +0100 Subject: One proposal for smarter closing of bugs. Fix setting of the default assignee. --- bugzillaBugTriage.js | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index 1c1db65..9af7695 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -1217,20 +1217,26 @@ bzPage.prototype.generateToolBar = function(anchor,array) { bzPage.prototype.generalPurposeCureForAllDisease = function (addString,nextState,secondParameter) { if (addString.length >0) { - this.addTextToComment(addString); - } + this.addTextToComment(addString); + } - if (nextState === "CLOSED") { - if (secondParameter === "UPSTREAM") { - this.addClosingUpstream(); - } else if (secondParameter.length > 0) { - this.selectOption("bug_status", nextState); - this.selectOption("resolution",secondParameter); - return 0; - } else { - throw("Missing resolution for CLOSED status."); - } - } + if (nextState === "CLOSED") { + if (secondParameter === "UPSTREAM") { + this.addClosingUpstream(); + } else if (secondParameter === "SOMERELEASE") { + // TODO for RAWHIDE close as RAWHIDE, + // if active selection -> CURRENTRELEASE + // and put the release version to + // "Fixed in Version" textbox + // otherwise -> NEXTRELEASE + } else if (secondParameter.length > 0) { + this.selectOption("bug_status", nextState); + this.selectOption("resolution",secondParameter); + return 0; + } else { + throw("Missing resolution for CLOSED status."); + } + } // Now closing bugs is done, what about the rest? if (nextState === "NEEDINFO") { @@ -1389,8 +1395,9 @@ function bzPage(doc) { this.checkComments(); this.buildButtons(topRow,bottomRow); + // FIXME this doesn't work as it should. $("#component",this.doc).change(function (){ - that.changeOwner(that.maintCCAddr); + that.changeOwner(that.defaultAssignee); }); } -- cgit