Rechercher une page de manuel
Fedora::Bugzilla::Bug.3pm
Langue: en
Version: 2009-09-26 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Fedora::Bugzilla::Bug - Bug classSYNOPSIS
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
DESCRIPTION
This is a class representing a bug in the Bugzilla system. You can get bug information, set info, attach files, add comments, etc...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 trac ticket with a patch ;)
BUG CREATION, SEARCHING AND RETRIEVAL
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.
METHODS
- new()
- Really, you should never call this. Let your $bz instance handle this.
ACCESSORS
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().- id
- The bug id. This class also stringifies to this value.
- alias [r/w]
- The alias of this bug, if any.
- summary [r/w]
- The bug summary (short_desc).
- creation_time
- last_change_time
- reporter
- Email::Address of the person / account that filed the bug.
- reporter_id
- Internal Bugzilla id of the reporter (Int).
- bug_status [r/w]
- status [r/w]
- Alias for bug_status().
- resolution [r/w]
- bug_file_loc [r/w]
- url [r/w]
- Alias for bug_file_loc().
- version [r/w]
- assigned_to [r/w]
- Email::Address of the assignee.
- qa_contact [r/w]
- Email::Address of the qa_contact for this bug.
- full_status
- ``NEW'', ``ASSIGNED'', ``CLOSED/NEXTRELEASE'', etc.
ASSIGNMENT
Accessors
Methods
STATUS
Accessors
Methods
- close
- close_nextrelease([Str])
- close_notabug([Str])
- close_dupe( ... )
- set_status( ... )
COMMENTS
See also Fedora::Bugzilla::Bug::Comment; comments are ordered as one would expect.Accessors
- comments
- Returns an array of Fedora::Bugzilla::Bug::Comment objects representing the bug's comments.
- comment_count
- Returns the number of comments.
- get_comment([Int])
- Return the comment; e.g. $bug->get_comment(5) would get comment #5.
- first_comment
- Fetch the first comment.
- last_comment
- Fetch the last comment.
Methods
- add_comment([Str])
- Adds a comment to the bug. (This calls the XML-RPC method directly; it is not necessary to call update().)
- has_comments
- 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_comments
- Clear our comments data and force it to be rebuilt the next time we need it.
BUGS WE DEPEND ON
Accessors
Methods
BLOCKED BUGS
Accessors
Methods
FLAGS
See also Fedora::Bugzilla::Bug::Flag. Flag data is currently parsed out of the XML representation of the bug returned by the web UI.Accessors
- flags
- Returns an array of Fedora::Bugzilla::Bug::Flag objects, representing all the flags this bug has set.
- get_flag([flag name (Str)])
- Return the named flag, if it exists for this bug.
- flag_count
- Returns the number of flags this bug has.
- has_flag([flag name (Str)])
- Returns true if this bug has the named flag.
- flag_names
- Returns an array of all flag names this bug has.
- flag_pairs
- FIXME
Methods
- set_flags(flag_name => 'value', [...])
- Set one or more flags. Note that the only valid values for a flag are '+', '-', '?', or undef (unset entirely).
- set_flag(flag_name => 'value')
- An alias for set_flags().
- has_flags
- True if this bug has any flags (any value).
- clear_flags
- Clear our flags data and force it to be rebuilt the next time we need it.
ATTACHMENTS
These allow us to manipulate the attachments of this bug. See also Fedora::Bugzilla::Bug::Attachment.Accessors
- attachments
- has_attachments
- attachment_count
- get_attachment([Int])
- first_attachment
- last_attachment
Methods
- add_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.
URIS
These are convienence methods for searching for and finding all URIs contained within the body of the bug. See also URI.Accessors
- uri_count
- Return the number of URIs found.
- grep_uris([CodeRef])
- 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/ });
- map_uris([CodeRef])
- As with grep_uris(), take a code ref and map() over all URIs with it.
Methods
- has_uris
- 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_uris
- Clear the list of URIs and force it to be rebuilt the next time we need it.
OTHER ATTRIBUTES
Generally, these reflect this interface rather than anything on bugzilla.- bz
- Our parent Fedora::Bugzilla object.
- data
- 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.
-
- has_data
- True if the data has been fetched.
- clear_data
- Clears data(); also triggers a cascade clear of the bulk of the object (except bz() and id()).
-
- dirty
- Boolean. Indicates if any attributes have been updated, but not written back to bugzilla yet.
- xml
- The raw XML representation of this bug, as fetched from the Bugzilla web UI.
-
- has_xml
- True if the XML representation has been pulled.
- clear_xml
- Clears xml() as well as anything that depends on it (twig, comments, etc).
-
- twig
- An XML::Twig object built from xml().
-
- has_twig
- True if the twig has been built out from xml().
- clear_twig
- Discard the twig and force it to be rebuilt the next time we access it.
-
DIAGNOSTICS
- Error message here, perhaps with %s placeholders
- [Description of error here]
- Another error message here
- [Description of error here]
[Et cetera, et cetera]
BUGS AND LIMITATIONS
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>.
TODO
Set support for...
CC list, depends, blocks.SEE ALSO
Fedora::Bugzilla, <http://www.bugzilla.org>, <http://bugzilla.redhat.com>, http://python-bugzilla.fedorahosted.org <http://python-bugzilla.fedorahosted.org>, WWW::Bugzilla3.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
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre