summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Product.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Product.pm')
-rw-r--r--Bugzilla/Product.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm
index 514649763..80e1752e6 100644
--- a/Bugzilla/Product.pm
+++ b/Bugzilla/Product.pm
@@ -791,6 +791,13 @@ sub flag_types {
return $self->{'flag_types'};
}
+sub classification {
+ my $self = shift;
+ $self->{'classification'} ||=
+ new Bugzilla::Classification($self->classification_id);
+ return $self->{'classification'};
+}
+
###############################
#### Accessors ######
###############################
@@ -853,6 +860,7 @@ Bugzilla::Product - Bugzilla product class.
my $bug_ids = $product->bug_ids();
my $has_access = $product->user_has_access($user);
my $flag_types = $product->flag_types();
+ my $classification = $product->classification();
my $id = $product->id;
my $name = $product->name;
@@ -1021,6 +1029,14 @@ a group is valid in a particular product.)
Returns: Two references to an array of flagtype objects.
+=item C<classification()>
+
+ Description: Returns the classification the product belongs to.
+
+ Params: none.
+
+ Returns: A Bugzilla::Classification object.
+
=back
=head1 SUBROUTINES