Fedora::Bugzilla(3) User Contributed Perl Documentation Fedora::Bugzilla(3)NAMEFedora::Bugzilla - Interact with Fedora's bugzilla instance
SYNOPSIS
use Fedora::Bugzilla;
DESCRIPTION
The XML-RPC interface to bugzilla is a quite useful, and while bugzilla
3.x is starting to flesh their interface out a bit more (see, e.g.,
WWW::Bugzilla3), Fedora's bugzilla implementation has a large number of
custom methods. This module aims to expose them, in a kinder, gentler
way.
In addition to the XML-RPC methods Bugzilla makes available, there are
also some things we only seem to be able to access via the web/XML
interfaces. (See, e.g., the flags, attachments and comments
functionality.) This package works to expose those as well.
Some functionality is more expensive to invoke than others, for a
variety of reasons. We strive to only access each bit as we need it,
to minimize time and effort while still making available as much as is
possible.
(And, yes, I know it's really RedHat's bugzilla. Some day... oh yes,
some day...)
INTERFACE
"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 ticket with a
patch ;)
Note also, the documentation is woefully incomplete.
METHODS
new Standard constructor. Takes a number of arguments, two of which
are required; note that each of these arguments is also available
through an accessor of the same name once the object instance has
been created.
userid => Str
Required. Your bugzilla userid (generally your email address).
passwd => Str
Required. Your bugzilla password.
site => Str|URI
The URI of the interface you're trying to access. Note this
(correctly) defaults to
<https://bugzilla.redhat.com/xmlrpc.cgi>.
cookie_file => Str|Path::Class::File
Takes a filename to give to the RPC's useragent instance as
file to hold the bugzilla cookies in. Set to undef to use no
actual file, and just cache cookies in-memory.
Defaults to: "$ENV{HOME}/.fedora.bz.cookies.txt";
login
Log in to the bugzilla service.
logged_in
True if we're logged in, false otherwise.
logout
Log out from the bugzilla service.
BUG CREATION
create_bug
Creates a new bug, passing @_ to the constructor of the default new
bug class. See Fedora::Bugzilla::NewBug.
new_bug_class
Gets/sets the class used to create new bugs with.
FETCHING BUGS
bug, get_bug (Int|Str)
Given a bug id/alias, returns a corresponding
Fedora::Bugzilla::Bug.
bugs, get_bugs (Int|Str, ...)
Given a list of bug id/aliases, return a Fedora::Bugzilla::Bugs
object.
SEARCHING AND QUERYING
These functions return a Fedora::Bugzilla::Bugs object representing the
results of the query.
run_savedsearch(Str)
Given the name of a saved search, run it and return the bugs.
run_named_query(Str)
Alias to run_savedsearch().
run_quicksearch(Str, ...)
Given a number of search terms, submit to Bugzilla for a
quicksearch (akin to entering terms on the web UI).
MISC SERVER METHODS
accessible_products
FIXME. Returns an array of products the user can search or enter
bugs against.
version
Returns the version of the bugzilla server.
timezone
Returns the timezone the bugzilla server is in.
offer_account_by_email (email address)
Sends an offer of a Bugzilla account to the given email address.
SPEED
We've tried to take steps to make sure things are speedy: "non-
changing" values are cached and only pulled when needed, etc. While we
don't implement a multicall queued approach (yet), we do try to
minimize the number of queries required; e.g. by using Bug.get_bugs
when multiple bugs are needed.
Some of the functionality requires that the XML representation of the
bug be pulled (e.g. flags, comments, attachment listings, etc); in
these cases we don't do the actual pull until requested.
For methods that return more than one bug wrapped in a
Fedora::Bugzilla::Bugs object, we fetch all the bug data through one
XMLRPC call once someone tries to access any of the bug data in it
(e.g. bugs(), num_bugs(), etc). Additionally, if aggressive_fetch is
set in the parent Fedora::Bugzilla object, we'll pull down the XML and
any other data we need for each bug. Pulling all the data at one time
can result in significant time savings over having each bug object pull
their own.
Updates
Note that performing an action on a bug that changes any value will
result in all data (save the id) being discarded, and reloaded the next
time the bug is accessed. It's best to pull any information you may
need _before_ updating the bug, if the situation warrants it, to avoid
the second call to the Bugzilla server.
DIAGNOSTICS
At the moment, we generally die() or confess() any errors.
BUGS, LIMITATIONS AND VERSION CONTROL
Source, tickets, etc can be all accessed through the Camelus project at
fedorahosted.org. Please use the 'Fedora-Bugzilla' component when
reporting issues or making feature requests:
L<http://camelus.fedorahosted.org>
There are still many areas of functionality we do not handle yet. If
you'd like to see something in here, specific or otherwise, please make
a feature request through the trac ticketing interface.
SEE ALSO
<http://www.bugzilla.org>, <http://bugzilla.redhat.com>,
http://python-bugzilla.fedorahosted.org <http://python-
bugzilla.fedorahosted.org>, the WWW::Bugzilla3 module.
AUTHOR
Chris Weyl "<cweyl@alumni.drew.edu>"
LICENCE AND COPYRIGHT
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
perl v5.14.1 2009-09-26 Fedora::Bugzilla(3)