Remove closed_bug_statuses() api
parent
a10187577e
commit
678e4acb92
|
@ -36,7 +36,7 @@ use Bugzilla::Status;
|
|||
sub check_bug_status
|
||||
{
|
||||
my $bug_status = shift;
|
||||
my @closed_bug_statuses = map { $_->name } closed_bug_statuses();
|
||||
my @closed_bug_statuses = map { $_->name } grep { !$_->is_open } Bugzilla::Status->get_all;
|
||||
if (!grep { $_ eq $bug_status } @closed_bug_statuses)
|
||||
{
|
||||
return "Must be a valid closed status: one of " . join(', ', @closed_bug_statuses);
|
||||
|
@ -69,7 +69,7 @@ sub get_param_list
|
|||
# the bug statuses above as they are still hardcoded.
|
||||
eval
|
||||
{
|
||||
my @current_closed_states = map {$_->name} closed_bug_statuses();
|
||||
my @current_closed_states = map { $_->name } grep { !$_->is_open } Bugzilla::Status->get_all;
|
||||
# If no closed state was found, use the default list above.
|
||||
@closed_bug_statuses = @current_closed_states if scalar(@current_closed_states);
|
||||
};
|
||||
|
|
|
@ -25,8 +25,6 @@ use Bugzilla::Error;
|
|||
use base qw(Bugzilla::Field::Choice Exporter);
|
||||
@Bugzilla::Status::EXPORT = qw(
|
||||
SPECIAL_STATUS_WORKFLOW_ACTIONS
|
||||
|
||||
closed_bug_statuses
|
||||
);
|
||||
|
||||
################################
|
||||
|
@ -122,13 +120,6 @@ sub _check_value
|
|||
##### Methods ####
|
||||
###############################
|
||||
|
||||
sub closed_bug_statuses
|
||||
{
|
||||
my @bug_statuses = Bugzilla::Status->get_all;
|
||||
@bug_statuses = grep { !$_->is_open } @bug_statuses;
|
||||
return @bug_statuses;
|
||||
}
|
||||
|
||||
sub can_change_to
|
||||
{
|
||||
my $self = shift;
|
||||
|
@ -234,8 +225,6 @@ Bugzilla::Status - Bug status class.
|
|||
my $bug_status = new Bugzilla::Status({name => 'ASSIGNED'});
|
||||
my $bug_status = new Bugzilla::Status(4);
|
||||
|
||||
my @closed_bug_statuses = closed_bug_statuses();
|
||||
|
||||
Bugzilla::Status::add_missing_bug_status_transitions($bug_status);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
@ -251,15 +240,6 @@ below.
|
|||
|
||||
=over
|
||||
|
||||
=item C<closed_bug_statuses>
|
||||
|
||||
Description: Returns a list of C<Bugzilla::Status> objects which can have
|
||||
a resolution associated with them ("closed" bug statuses).
|
||||
|
||||
Params: none.
|
||||
|
||||
Returns: A list of Bugzilla::Status objects.
|
||||
|
||||
=item C<can_change_to>
|
||||
|
||||
Description: Returns the list of active statuses a bug can be changed to
|
||||
|
|
|
@ -1102,8 +1102,8 @@ $vars->{displaycolumns} = \@displaycolumns;
|
|||
|
||||
$vars->{openstates} = [ map { $_->name } grep { $_->is_open } Bugzilla::Status->get_all ];
|
||||
# used by list.ics.tmpl
|
||||
$vars->{assignedstates} = [ map { $_->name } grep { $_->is_active && $_->is_assigned } Bugzilla::Status->get_all ];
|
||||
$vars->{closedstates} = [ map { $_->name } closed_bug_statuses() ];
|
||||
$vars->{assignedstates} = [ map { $_->name } grep { $_->is_assigned } Bugzilla::Status->get_all ];
|
||||
$vars->{closedstates} = [ map { $_->name } grep { !$_->is_open } Bugzilla::Status->get_all ];
|
||||
|
||||
# The iCal file needs priorities ordered from 1 to 9 (highest to lowest)
|
||||
# If there are more than 9 values, just make all the lower ones 9
|
||||
|
|
Loading…
Reference in New Issue