NAME

WebService::Bugzilla::Field - Bugzilla Field object and service

VERSION

version 0.001

SYNOPSIS

my $fields = $bz->field->get;
for my $f (@{$fields}) {
    say $f->name, ' (', $f->display_name, ')';
}

my $status = $bz->field->get_field('bug_status');
for my $v (@{ $status->values }) {
    say $v->name;
}

DESCRIPTION

Provides access to the Bugzilla Field API. Field objects describe bug field definitions and provide helpers to list field metadata and legal values.

ATTRIBUTES

All attributes are read-only.

display_name

Human-readable label for the field.

is_custom

Boolean. Whether the field is a custom field.

is_mandatory

Boolean. Whether the field is required.

is_on_bug_entry

Boolean. Whether the field appears on the new-bug entry form.

name

Internal field name (e.g. bug_status).

type

Numeric field type identifier.

value_field

Name of the field that controls which values are valid for this field.

values

Arrayref of WebService::Bugzilla::Field::Value objects representing the legal values for this field.

visibility_field

Name of the field that controls whether this field is visible.

visibility_values

Arrayref of values of the visibility_field for which this field is shown.

METHODS

get

my $fields = $bz->field->get;

List all bug field definitions. See GET /rest/field/bug.

Returns an arrayref of WebService::Bugzilla::Field objects.

get_field

my $f = $bz->field->get_field($id_or_name);

Fetch a single field definition by numeric ID or name. See GET /rest/field/bug/{id_or_name}.

Returns a WebService::Bugzilla::Field, or undef if not found.

my $values = $bz->field->legal_values($field);
my $values = $bz->field->legal_values($field, $product_id);

Return legal values for a field, optionally scoped to a product. See GET /rest/field/bug/{field}/values.

Returns an arrayref of value hashrefs.

SEE ALSO

WebService::Bugzilla - main client

WebService::Bugzilla::Field::Value - individual field value objects

https://bmo.readthedocs.io/en/latest/api/core/v1/field.html - Bugzilla Field REST API

AUTHOR

Dean Hamstead <dean@fragfest.com.au>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2026 by Dean Hamstead.

This is free software, licensed under:

The MIT (X11) License