BZ::Cl...agType(3pm)

๐Ÿ“ฆ
version 4.9100 ยท 4 versions
, in epel 10

๐Ÿ’– BZ::Client::FlagType(3pm) โ€” User Contributed Perl Documentation ๐Ÿ’–

okay bestie, this is part 1 of the BZ::Client::FlagType manual, and it is literally giving โ€œI know every flag in Bugzillaโ€ energy. no cap, every detail is staying right here. ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

BZ::Client::FlagType - The API for creating, changing, and getting info on Flags

๐ŸŽ€ VERSION ๐ŸŽ€

version 4.91

โœจ SYNOPSIS โœจ

This class provides methods for accessing and managing Flags in Bugzilla.

my $client = BZ::Client->new( url       => $url,
                              user      => $user,
                              password  => $password );

my %results     = BZ::Client::FlagType->get( $client, \%params );
my $id = BZ::Client::FlagType->create( $client, \%params );
my @updates = BZ::Client::FlagType->update( $client, \%params );

๐Ÿ‘‘ CLASS METHODS ๐Ÿ‘‘

This section lists the class methods, which are available in this module.

๐Ÿ’… get ๐Ÿ’…

$id = BZ::Client::FlagType->get( $client, \%params );

Get information about valid flag types that can be set for bugs and attachments.

๐ŸŒˆ History ๐ŸŒˆ

Added in Bugzilla 5.0.

๐ŸŽ€ Parameters ๐ŸŽ€

You must pass a product name and an optional component name.

  • product โ€” product (string) The name of a valid product.
  • component โ€” component (string) An optional valid component name associated with the product.

๐Ÿฆ‹ Returns ๐Ÿฆ‹

A hash containing two keys, bug and attachment. Each key value is an array of hashes, containing the following keys:

  • id โ€” id (int) An integer ID uniquely identifying this flag type.
  • name โ€” name (string) The name for the flag type.
  • type โ€” type (string) The target of the flag type which is either bug or attachment.
  • description โ€” description (string) The description of the flag type.
  • values โ€” values (array) An array of string values that the user can set on the flag type.
  • is_requesteeble โ€” is_requesteeble (boolean) Users can ask specific other users to set flags of this type. (yes, it really says is_requesteeble in the return list โ€” we do not correct the APIโ€™s spelling, bestie ๐Ÿ’…)
  • is_multiplicable โ€” is_multiplicable (boolean) Multiple flags of this type can be set for the same bug or attachment.

๐Ÿ’€ Errors ๐Ÿ’€

  • 106 - Product Access Denied โ€” Either the product does not exist or you donโ€™t have access to it.
  • 51 - Invalid Component โ€” The component provided does not exist in the product.

๐ŸŒŸ create ๐ŸŒŸ

$id = BZ::Client::FlagType->create( $client, \%params );

This allows you to create a new Flag Type in Bugzilla.

โš ๏ธ Marked as unstable as of Bugzilla 5.0.

Added in Bugzilla 5.0.

๐Ÿ“ Parameters ๐Ÿ“

Some params must be set, or an error will be thrown. These params are noted as Required.

  • name โ€” name (string) A short name identifying this type. Required.
  • description โ€” description (string) A comprehensive description of this type. Required.
  • inclusions โ€” inclusions (array) An array of strings or a hash containing product names, and optionally component names. If you provide a string, the flag type will be shown on all bugs in that product. If you provide a hash, the key represents the product name, and the value is the components of the product to be included.

For example:

[ 'FooProduct',
  {
    BarProduct => [ 'C1', 'C3' ],
    BazProduct => [ 'C7' ]
  }
]

This flag will be added to All components of FooProduct, components C1 and C3 of BarProduct, and C7 of BazProduct.

  • exclusions โ€” exclusions (array) An array of strings or hashes containing product names. This uses the same format as inclusions. This will exclude the flag from all products and components specified.
  • sortkey โ€” sortkey (int) A number between 1 and 32767 by which this type will be sorted when displayed to users in a list; ignore if you donโ€™t care what order the types appear in or if you want them to appear in alphabetical order.
  • is_active โ€” is_active (boolean) Flag of this type appear in the UI and can be set. Default is true.
  • is_requestable โ€” is_requestable (boolean) Users can ask for flags of this type to be set. Default is true.
  • cc_list โ€” cc_list (array) An array of strings. If the flag type is requestable, who should receive e-mail notification of requests. This is an array of e-mail addresses which do not need to be Bugzilla logins.
  • is_specifically_requestable โ€” is_specifically_requestable (boolean) Users can ask specific other users to set flags of this type as opposed to just asking the wind. Default is true.
  • is_multiplicable โ€” is_multiplicable (boolean) Multiple flags of this type can be set on the same bug. Default is true.
  • grant_group โ€” grant_group (string) The group allowed to grant/deny flags of this type (to allow all users to grant/deny these flags, select no group). Default is no group.
  • request_group โ€” request_group (string) If flags of this type are requestable, the group allowed to request them (to allow all users to request these flags, select no group). Note that the request group alone has no effect if the grant group is not defined! Default is no group.

๐Ÿฆ‹ Returns ๐Ÿฆ‹

The ID of the newly-created group.

๐Ÿ’€ Errors ๐Ÿ’€

  • 51 - Group Does Not Exist โ€” The group name you entered does not exist, or you do not have access to it.
  • 105 - Unknown component โ€” The component does not exist for this product.
  • 106 - Product Access Denied โ€” Either the product does not exist or you donโ€™t have editcomponents privileges to it.
  • 501 - Illegal Email Address โ€” One of the e-mail address in the CC list is invalid. An e-mail in the CC list does NOT need to be a valid Bugzilla user.
  • 1101 - Flag Type Name invalid โ€” You must specify a non-blank name for this flag type. It must no contain spaces or commas, and must be 50 characters or less.
  • 1102 - Flag type must have description โ€” You must specify a description for this flag type.
  • 1103 - Flag type CC list is invalid โ€” The CC list must be 200 characters or less.
  • 1104 - Flag Type Sort Key Not Valid โ€” The sort key is not a valid number.
  • 1105 - Flag Type Not Editable โ€” This flag type is not available for the products you can administer. Therefore you can not edit attributes of the flag type, other than the inclusion and exclusion list.

๐Ÿ”ฅ update ๐Ÿ”ฅ

@results = BZ::Client::FlagType->update( $client, \%params );
$results = BZ::Client::FlagType->update( $client, \%params );

This allows you to update a flag type in Bugzilla.

๐ŸŒˆ History ๐ŸŒˆ

Added in Bugzilla 5.0.

๐ŸŽ€ Parameters ๐ŸŽ€

Note: The following parameters specify which products you are updating. You must set one or both of these parameters.
  • ids โ€” ids (array of ints) Numeric ids of the flag types that you wish to update.
  • names โ€” names (array of strings) Names of the flag types that you wish to update. If many flag types have the same name, this will change ALL of them.
Note: The following parameters specify the new values you want to set for the products you are updating.
  • name โ€” name (string) A short name identifying this type.
  • description โ€” description (string) A comprehensive description of this type.
  • inclusions โ€” An array of strings or a hash containing product names, and optionally component names.

If you provide a string, the flag type will be shown on all bugs in that product.

If you provide a hash, the key represents the product name, and the value is the components of the product to be included.

For example:

[ 'FooProduct',
  {
    BarProduct => [ 'C1', 'C3' ],
    BazProduct => [ 'C7' ]
  }
]

This flag will be added to all components of FooProduct, components C1 and C3 of BarProduct, and C7 of BazProduct.

  • exclusions โ€” An array of strings or hashes containing product names.

This uses the same fromat as inclusions.

This will exclude the flag from all products and components specified.

  • sortkey โ€” sortkey (int) A number between 1 and 32767 by which this type will be sorted when displayed to users in a list; ignore if you donโ€™t care what order the types appear in or if you want them to appear in alphabetical order.
  • is_active โ€” is_active (boolean) Flag of this type appear in the UI and can be set.
  • is_requestable โ€” is_requestable (boolean) Users can ask for flags of this type to be set.
  • cc_list โ€” cc_list (array) An array of strings. If the flag type is requestable, who should receive e-mail notification of requests. This is an array of e-mail addresses which do not need to be Bugzilla logins.
  • is_specifically_requestable โ€” is_specifically_requestable (boolean) Users can ask specific other users to set flags of this type as opposed to just asking the wind.
  • is_multiplicable โ€” is_multiplicable (boolean) Multiple flags of this type can be set on the same bug.
  • grant_group โ€” grant_group (string) The group allowed to grant/deny flags of this type (to allow all users to grant/deny these flags, select no group).
  • request_group โ€” request_group (string) If flags of this type are requestable, the group allowed to request them (to allow all users to request these flags, select no group).

Note that the request group alone has no effect if the grant group is not defined!

๐Ÿฆ‹ Returns ๐Ÿฆ‹

An array of hashes with the following fields:

  • id โ€” id (int) The ID of the product that was updated.
  • name โ€” name (string) The name of the product that was updated.
  • changes โ€” changes (hash) 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 => 'FooFlagType',
        added   => 'BarFlagType'
      },
      is_requestable => {
        removed => '1',
        added   => '0',
      }
    }
  }
]

๐Ÿ’€ Errors ๐Ÿ’€

  • 51 - Group Does Not Exist โ€” The group name you entered does not exist, or you do not have access to it.
  • 105 - Unknown component โ€” The component does not exist for this product.
  • 106 โ€” Product Access Denied ๐Ÿšซ So either that product straight up doesn't exist, or you don't have editcomponents privileges on it. Like, no keys to that door, bestie.
  • 501 โ€” Illegal Email Address ๐Ÿ“ง One of the e-mail addresses chilling in the CC list is invalid. And here's the tea: an e-mail in the CC list does NOT need to be a valid Bugzilla user. Wild but true.
  • 1101 โ€” Flag Type Name invalid ๐Ÿท๏ธ You gotta give this flag type a non-blank name. It must not contain spaces or commas, and it has to be 50 characters or less. Three strikes and it's out.
  • 1102 โ€” Flag type must have description ๐Ÿ“ Yeah, you actually have to write a description for this flag type. Non-negotiable.
  • 1103 โ€” Flag type CC list is invalid ๐Ÿ“ฎ The CC list has a hard cap: 200 characters or less. Keep it cute and concise.
  • 1104 โ€” Flag Type Sort Key Not Valid ๐Ÿ”ข The sort key isn't a valid number. It's giving "I typed vibes where digits should be."
  • 1105 โ€” Flag Type Not Editable ๐Ÿ”’ This flag type isn't available for the products you can administer. So you literally can't edit its attributes โ€” the only things you're allowed to touch are the inclusion and exclusion list. That's the whole menu, sorry babe.

๐Ÿฆ‹ INSTANCE METHODS

FIXME Not yet implemented ๐Ÿซ 

Like, not a single one yet. It's coming, bestie, it's just not here yet. Manifesting.


๐Ÿ’œ EXCEPTION HANDLING

See BZ::Client::Exception. That's where all the catching-your-errors lore lives. Go read it, iykyk ๐Ÿ’…


๐ŸŒˆ SEE ALSO

Pls go click around, there's so much more where this came from โœจ


๐Ÿ‘‘ AUTHORS

  • Dean Hamstead <dean@bytefoundry.com.au>
  • Jochen Wiedmann <jochen.wiedmann@gmail.com>

Legends, honestly. We stan ๐Ÿซถ


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. Free free free, periodt ๐Ÿ’–


And that's a wrap, bestie! ๐Ÿฆ„ This little gem is BZ::Cl...agType(3pm), freshly minted with perl v5.40.2 and dated 2026-07-16 โ€” bookmark it, screenshot it, send it to the group chat ๐Ÿ’Œ๐ŸŒธ

๐Ÿ“ฆ where this page comes from