summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config/BugChange.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-07-13 20:10:39 +0200
committerlpsolit%gmail.com <>2007-07-13 20:10:39 +0200
commitff222adc4a6cb0349f7642d61bb63d2ff970607c (patch)
treeba87c96d90582e7740991bc2c65dba56c92ee76c /Bugzilla/Config/BugChange.pm
parent012d45ae9579b0f1690a2daed8212f38e9c9e26a (diff)
downloadbugzilla-ff222adc4a6cb0349f7642d61bb63d2ff970607c.tar.gz
bugzilla-ff222adc4a6cb0349f7642d61bb63d2ff970607c.tar.xz
Bug 385415: Bugs marked as duplicate or moved to another installation always go to the RESOLVED state, even if the workflow has RESOLVED excluded from it (or if this bug status has been removed or renamed). Some major problems related to the workflow when upgrading or installing 3.1 are also fixed here - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/Config/BugChange.pm')
-rw-r--r--Bugzilla/Config/BugChange.pm22
1 files changed, 22 insertions, 0 deletions
diff --git a/Bugzilla/Config/BugChange.pm b/Bugzilla/Config/BugChange.pm
index 6941f0046..65b2aec96 100644
--- a/Bugzilla/Config/BugChange.pm
+++ b/Bugzilla/Config/BugChange.pm
@@ -34,13 +34,35 @@ package Bugzilla::Config::BugChange;
use strict;
use Bugzilla::Config::Common;
+use Bugzilla::Status;
$Bugzilla::Config::BugChange::sortkey = "03";
sub get_param_list {
my $class = shift;
+
+ # Hardcoded bug statuses which existed before Bugzilla 3.1.
+ my @closed_bug_statuses = ('RESOLVED', 'VERIFIED', 'CLOSED');
+
+ # If we are upgrading from 3.0 or older, bug statuses are not customisable
+ # and bug_status.is_open is not yet defined (hence the eval), so we use
+ # the bug statuses above as they are still hardcoded.
+ eval {
+ my @current_closed_states = map {$_->name} Bugzilla::Status::closed_bug_statuses();
+ # If no closed state was found, use the default list above.
+ @closed_bug_statuses = @current_closed_states if scalar(@current_closed_states);
+ };
+
my @param_list = (
{
+ name => 'duplicate_or_move_bug_status',
+ type => 's',
+ choices => \@closed_bug_statuses,
+ default => $closed_bug_statuses[0],
+ checker => \&check_bug_status
+ },
+
+ {
name => 'letsubmitterchoosepriority',
type => 'b',
default => 1