From fa9970f7a6545fd9ed81a2fef23e5453db46bbec Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 19 Jul 2017 10:51:04 -0400 Subject: Bug 1382085 - Add find_first_flag_type() to Bugzilla::Component --- Bugzilla/Component.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index 83ddec356..08a55846d 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -20,6 +20,7 @@ use Bugzilla::User; use Bugzilla::FlagType; use Bugzilla::Series; +use List::Util qw(first); use Scalar::Util qw(blessed); ############################### @@ -405,6 +406,12 @@ sub flag_types { return $self->{'flag_types'}; } +sub find_first_flag_type { + my ($self, $target_type, $name) = @_; + + return first { $_->name eq $name } @{ $self->flag_types->{$target_type} }; +} + sub initial_cc { my $self = shift; my $dbh = Bugzilla->dbh; @@ -609,6 +616,17 @@ Component.pm represents a Product Component object. Returns: Nothing. + +=item C Description: Changes the description of the component. -- cgit v1.2.3-24-g4f1b