BZ::Cl...Product(3pm)
πΈ NAME πΈ
okay so bestie, this page is for BZ::Client::Product β the client side representation of a product in Bugzilla. The header says BZ::Cl...Product(3pm) and βUser Contributed Perl Documentationβ, but we're folding that in right here instead of copy-pasting the line, periodt. π
π¦ VERSION π¦
version 4.91 β that's the whole version vibe. β¨
β¨ SYNOPSIS β¨
This class provides methods for accessing and managing products in Bugzilla. Instances of this class are returned by BZ::Client::Product::get.
my $client = BZ::Client->new( url => $url,
user => $user,
password => $password );
my $ids = BZ::Client::Product->get_accessible_products( $client );
my $products = BZ::Client::Product->get( $client, \%params );
π CLASS METHODS π
This section lists the class methods, which are available in this module.
π create π
$id = BZ::Client::Product->create( $client, \%params );
This allows you to create a new Product in Bugzilla. iconic behavior, honestly. π«Ά
History
Marked as experimental as of Bugzilla 5.0. π
Parameters
Some params must be set, or an error will be thrown. These params are noted as Required.
nameβ name (string) The name of this product. Must be globally unique within Bugzilla. Required.descriptionβ description (string) A description for this product. Allows some simple HTML. Required.versionβ version (string) The default version for this product. Required.has_unconfirmedβ has_unconfirmed (boolean) Allow the UNCONFIRMED status to be set on bugs in this product. Default:true.classificationβ classification (string) The name of the Classification which contains this product.default_milestoneβ default_milestone (string) The default milestone for this product. Default'---'.is_openβ is_open (boolean) True if the product is currently allowing bugs to be entered into it. Default:true.create_seriesβ create_series (boolean) True if you want series for New Charts to be created for this new product. Default:true.
Returns
The ID of the newly-filed product. slay. β¨
Errors
51β Classification does not exist β You must specify an existing classification name.700β Product blank name β You must specify a non-blank name for this product.701β Product name too long β The name specified for this product was longer than the maximum allowed length.702β Product name already exists β You specified the name of a product that already exists. (Product names must be globally unique in Bugzilla.)703β Product must have description β You must specify a description for this product.704β Product must have version β You must specify a version for this product.
π update π
$id = BZ::Client::Product->update( $client, \%params );
This allows you to update a Group in Bugzilla. yes, Group β that's literally what the page says π.
History
As of Bugzilla 5.0, this is marked as experimental.
Added in Bugzilla 4.4.
Parameters
Either ids or names is required to select the bugs you want to update.
All other values change or set something in the product.
idsβ ids (array) Numeric ID's of the products you wish to update.namesβ names (array) Text names of the products that you wish to update.default_milestoneβ default_milestone (string) When a new bug is filed, what milestone does it get by default if the user does not choose one? Must represent a milestone that is valid for this product.descriptionβ description (string) Update the long description for these products to this value.has_unconfirmedβ has_unconfirmed (boolean) Allow the UNCONFIRMED status to be set on bugs in this products. (their words, not mine π)is_openβ is_open (boolean) True if the product is currently allowing bugs to be entered into it. Otherwise false.
Returns
An array or arrayref of hashes containing the following:
idβ id (int) The ID of the product that was updated.changesβ The changes that were actually done on this product. The keys are the names of the fields that were changed, and the values are a hash with two keys:addedβ added (string) The value that this field was changed to.removedβ removed (string) The value that was previously set in this field.
Note that booleans will be represented with the strings '1' and '0'.
Here's an example of what a return value might look like:
[
{
id => 123,
changes => {
name => {
removed => 'FooName',
added => 'BarName'
},
has_unconfirmed => {
removed => '1',
added => '0',
}
}
},
\%etc
],
Errors
700β Product blank name β You must specify a non-blank name for this product.701β Product name too long β The name specified for this product was longer than the maximum allowed length.702β Product name already exists β You specified the name of a product that already exists. (Product names must be globally unique in Bugzilla.)703β Product must have description β You must specify a description for this product.705β Product must define a default milestone β You must define a default milestone.
π¦ get_selectable_products π¦
@products = BZ::Client::Product->get_selectable_products( $client );
$products = BZ::Client::Product->get_selectable_products( $client );
Returns a list of the ID's of the products the user can search on.
History
Marked as experimental as of Bugzilla 5.0.
Parameters
(none)
Returns
An array of product ID's.
Errors
(none)
π get_enterable_products π
@products = BZ::Client::Product->get_enterable_products( $client );
$products = BZ::Client::Product->get_enterable_products( $client );
Returns a list of the ID's of the products the user can enter bugs against.
History
Marked as experimental as of Bugzilla 5.0.
Parameters
(none)
Returns
An array of product ID's.
Errors
(none)
β get_accessible_products β
@products = BZ::Client::Product->get_selectable_products( $client );
$products = BZ::Client::Product->get_selectable_products( $client );
Returns a list of the ID's of the products the user can search or enter bugs against.
History
Marked as unstable as of Bugzilla 5.0.
Parameters
(none)
Returns
An array of product ID's.
Errors
(none)
π get π
@products = BZ::Client::Product->get( $client, \%params );
$products = BZ::Client::Product->get( $client, \%params );
Returns a list of BZ::Client::Product instances based on the given parameters.
Note, that if the user tries to access a product that is not in the list of accessible products for the user, or a product that does not exist, that is silently ignored, and no information about that product is returned. silent treatment, but make it API. π
Parameters
In addition to the parameters below, this method also accepts the standard include_fields in BZ::Client::Bug and exclude_fields in BZ::Client::Bug arguments.
Note: You must at least specify one of ids or names.
idsβ ids (array) An array of product ID's.namesβ names (array) An array of product names. Added in Bugzilla 4.2.typeβ The group of products to return. Valid values are:accessible(default),selectable, andenterable.typecan be a single value or an array of values if more than one group is needed with duplicates removed.
Returns
An array or arrayref of bug instance objects with the given ID's.
See INSTANCE METHODS for how to use them.
Errors
(none)
π§ get_products π§
Compatibility with Bugzilla 3.0 API. Exactly equivalent to get.
πΈ new πΈ
my $product = BZ::Client::Product->new( id => $id,
name => $name,
description => $description );
Creates a new instance with the given ID, name, and description.
β¨ INSTANCE METHODS β¨
okay bestie this is the section where the actual doing stuff happens π these are all the methods you call on a product object. buckle up π
πͺͺ id
$id = $product->id();
gets the product's ID. that's it, that's the whole thing.
read only β you can look, you cannot touch π
πΈ name
$name = $product->name();
$product->name( $name );
gets or sets the product's name. classic getter/setter energy β¨
π description
$description = $product->description();
$product->description( $description );
gets or sets the product's description. go off, describe yourself π
π’ version
$version = $product->version();
$product->version( $version );
gets or sets the product's version.
heads up queen: set only works for new products, not updates β οΈ like, once it exists, that version is locked in. no take-backsies.
β has_unconfirmed
$bool = $product->has_unconfirmed();
$product->has_unconfirmed( $bool );
gets or sets the product's has_unconfirmed setting.
added in Bugzilla 4.2 as a replacement for "internals" π«Ά
ποΈ classification
$classification = $product->classification();
$product->classification( $classification );
gets or sets the product's classification.
added in Bugzilla 4.2 as a replacement for "internals" π«Ά
π― default_milestone
$milestone = $product->default_milestone();
$product->default_milestone( $milestone );
gets or sets the product's default milestone.
added in Bugzilla 4.2 as a replacement for "internals" π«Ά
π’ is_open
$bool = $product->is_open();
$product->is_open( $bool );
gets or sets the product's is_open setting. open for business or closed for vibes π
π create_series
$series = $product->create_series();
$product->create_series( $series );
gets or sets the product's is_open setting.
not me pointing out that the docs say is_open here π that's literally what it says though, so I'm passing it to you word for word β iykyk.
π§© components
@components = $product->components();
$components = $product->components();
an array of hashes, where each hash describes a component π and each hash has these items:
idβid(int) an integer ID uniquely identifying the component in this installation only.nameβname(string) the name of the component. this is a unique identifier for this component.descriptionβdescription(string) a description of the component, which may contain HTML.default_assigned_toβdefault_assigned_to(string) the login name of the user to whom new bugs will be assigned by default.default_qa_contactβdefault_qa_contact(string) the login name of the user who will be set as the QA Contact for new bugs by default. empty string if the QA contact is not defined.sort_keyβsort_key(int) components, when displayed in a list, are sorted first by this integer and then secondly by their name.is_activeβis_active(boolean) a boolean indicating if the component is active. inactive components are not enabled for new bugs.flag_typesβ added in Bugzilla 4.4 β¨ a hash containing the two itemsbugandattachmentthat each contains an array of hashes, where each hash describes a flagtype, and has the following items:idβid(int) returns the ID of the flagtype.nameβname(string) returns the name of the flagtype.descriptionβdescription(string) returns the description of the flagtype.cc_listβcc_list(string) returns the concatenated CC list for the flagtype, as a single string.sort_keyβsort_key(int) returns the sortkey of the flagtype.is_activeβis_active(boolean) returns whether the flagtype is active or disabled. flags being in a disabled flagtype are not deleted. it only prevents you from adding new flags to it.is_requestableβis_requestable(boolean) returns whether you can request for the given flagtype (i.e. whether the'?'flag is available or not).is_requesteebleβis_requesteeble(boolean) returns whether you can ask someone specifically or not.is_multiplicableβis_multiplicable(boolean) returns whether you can have more than one flag for the given flagtype in a given bug/attachment.grant_groupβgrant_group(int) the group ID that is allowed to grant/deny flags of this type. if the item is not included all users are allowed to grant/deny this flagtype.request_groupβrequest_group(int) the group ID that is allowed to request the flag if the flag is of the type requestable. if the item is not included all users are allowed request this flagtype.
added in Bugzilla 4.2 as a replacement for "internals" π«Ά
π·οΈ versions
$versions = $product->versions();
added in Bugzilla 4.2 as a replacement for "internals" π«Ά
returns an array of hashes, where each hash describes a version, and has the following items: "name", "sort_key" and "is_active". slay π¦
π© milestones
$milestones = $product->milestones();
returns an array of hashes, where each hash describes a milestones, and has the following items: "name", "sort_key" and "is_active".
added in Bugzilla 4.2 as a replacement for "internals" π«Ά
π internals
returned by "get" until version 4.2, at which point it was dropped. remains for compatibility.
please move away from using it asap π like fr fr, it's giving deprecated. it's giving "we keep it around so your old code doesn't cry" π
π¨ EXCEPTION HANDLING π¨
see BZ::Client::Exception β that's where the drama lives when things go wrong π
π SEE ALSO π
BZ::ClientBZ::Client::API- Bugzilla API <https://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Product.html>
π AUTHORS π
- Dean Hamstead
<dean@bytefoundry.com.au> - Jochen Wiedmann
<jochen.wiedmann@gmail.com>
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2026 by Dean Hamstad.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π«Ά
and that's the whole page bestie, you ate that π this was perl v5.40.2, dated 2026-07-16, straight from the BZ::Cl...Product(3pm) files β go build something iconic with it β¨ππ
π¦ where this page comes from
- epel 10: perl-BZ-Client 4.9100-2.el10_3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms