
Fedora::Bugzilla::Bug - Bug class

use Fedora::Bugzilla;
my $bz = Fedora::Bugzilla->new(...);
# fetch a bug
my $bug1 = $bz->get_bug('123456');
my $bug2 = $bz->get_bug('perl-Moose');
# etc

This is a class representing a bug in the Bugzilla system. You can get bug information, set info, attach files, add comments, etc...

"Release Early, Release Often"
I've tried to get at least the methods I use in here. I know I'm missing some, and I bet there are others I don't even know about... I'll try not to, but I won't guarantee that I won't change the api in some incompatable way. If you'd like to see something here, please either drop me a line (see AUTHOR) or better yet, open a trac ticket with a patch ;)

For bug creation, please see Fedora::Bugzilla for the creation methods, and Fedora::Bugzilla::NewBug for the required attributes.
Fedora::Bugzilla also contains the methods to search for and retrieve bugs.

Really, you should never call this. Let your $bz instance handle this.

For the accessors/attributes listed below marked as [r/w], you can set a new value and update the bug when ready by calling update().
The bug id. This class also stringifies to this value.
The alias of this bug, if any.
The bug summary (short_desc).
Email::Address of the person / account that filed the bug.
Internal Bugzilla id of the reporter (Int).
Alias for bug_status().
Alias for bug_file_loc().
Email::Address of the assignee.
Email::Address of the qa_contact for this bug.
"NEW", "ASSIGNED", "CLOSED/NEXTRELEASE", etc.



See also Fedora::Bugzilla::Bug::Comment; comments are ordered as one would expect.
Returns an array of Fedora::Bugzilla::Bug::Comment objects representing the bug's comments.
Returns the number of comments.
Return the comment; e.g. $bug->get_comment(5) would get comment #5.
Fetch the first comment.
Fetch the last comment.
Adds a comment to the bug. (This calls the XML-RPC method directly; it is not necessary to call update().)
True if we've already generated our list of comments from the bug. Note this should not be used to determine if the bug has any comments; use comment_count() for that.
Clear our comments data and force it to be rebuilt the next time we need it.



See also Fedora::Bugzilla::Bug::Flag. Flag data is currently parsed out of the XML representation of the bug returned by the web UI.
Returns an array of Fedora::Bugzilla::Bug::Flag objects, representing all the flags this bug has set.
Return the named flag, if it exists for this bug.
Returns the number of flags this bug has.
Returns true if this bug has the named flag.
Returns an array of all flag names this bug has.
FIXME
Set one or more flags. Note that the only valid values for a flag are '+', '-', '?', or undef (unset entirely).
An alias for set_flags().
True if this bug has any flags (any value).
Clear our flags data and force it to be rebuilt the next time we need it.

These allow us to manipulate the attachments of this bug. See also Fedora::Bugzilla::Bug::Attachment.
Adds an attachment to the bug; see Fedora::Bugzilla::Bug::NewAttachment for the required paramaters.
Note you can also pass a pre-built Fedora::Bugzilla::Bug::NewAttachment as the only argument.

These are convienence methods for searching for and finding all URIs contained within the body of the bug. See also URI.
Return the number of URIs found.
This operates much the way you'd expect the grep() function to: given a coderef, iterate over each uri and see if it matches. e.g., to find all URIs that match koji.fedoraproject.org:
@uris = $bug->grep_uris(sub { /koji.fedoraproject.org/ });
As with grep_uris(), take a code ref and map() over all URIs with it.
True if we've already generated our list of URIs from the bug. Note this should not be used to determine if any URIs are present in the bug; use uri_count() for that.
Clear the list of URIs and force it to be rebuilt the next time we need it.

Generally, these reflect this interface rather than anything on bugzilla.
Our parent Fedora::Bugzilla object.
A hashref of the raw bug data provided by bugzilla. Note that changes here are not reflected in bugzilla proper; you must use the accessors and call update() for that to happen.
True if the data has been fetched.
Clears data(); also triggers a cascade clear of the bulk of the object (except bz() and id()).
Boolean. Indicates if any attributes have been updated, but not written back to bugzilla yet.
The raw XML representation of this bug, as fetched from the Bugzilla web UI.
An XML::Twig object built from xml().
True if the twig has been built out from xml().
Discard the twig and force it to be rebuilt the next time we access it.

Error message here, perhaps with %s placeholders[Description of error here]
Another error message here[Description of error here]
[Et cetera, et cetera]

There are still many common attributes we do not handle getting/setting yet. If you'd like to see something specific in here, please make a feature request.
Please report any bugs or feature requests to bug-fedora-bugzilla@rt.cpan.org, or through the web interface at http://rt.cpan.org.

CC list, depends, blocks.

Fedora::Bugzilla, http://www.bugzilla.org, http://bugzilla.redhat.com, http://python-bugzilla.fedorahosted.org, WWW::Bugzilla3.

Chris Weyl <cweyl@alumni.drew.edu>

Copyright (c) 2008, Chris Weyl <cweyl@alumni.drew.edu>.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS OR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the
Free Software Foundation, Inc.,
59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA