.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "WWW::Bugzilla 3pm" .TH WWW::Bugzilla 3pm "2021-01-07" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" WWW::Bugzilla \- Handles submission/update of bugzilla bugs via WWW::Mechanize. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use WWW::Bugzilla; \& \& # create new bug \& my $bz = WWW::Bugzilla\->new( server => \*(Aqwww.mybugzilla.com\*(Aq, \& email => \*(Aqbuguser@bug.com\*(Aq, \& password => \*(Aqmypassword\*(Aq ); \& \& # enter info into some fields and save new bug \& \& # get list of available version choices \& my @versions = $bz\->available(\*(Aqversion\*(Aq); \& \& # set version \& $bz\->version( $versions[0] ); \& \& # get list of available products \& my @products = $bz\->available(\*(Aqproduct\*(Aq); \& \& # set product \& $bz\->product( $products[0] ); \& \& # get list of components available \& my @components = $bz\->available(\*(Aqcomponent\*(Aq); \& \& # set component \& $bz\->component( $components[0] ); \& \& # optionally do the same for platform, os, priority, severity. \& \& $bz\->assigned_to( \*(Aqjoeschmoe@whatever.com\*(Aq ); \& $bz\->summary( $some_text ); \& $bz\->description( $some_more_text ); \& \& # submit bug, returning new bug number \& my $bug_number = $bz\->commit; \& \& # all of the above could have been done in a much easier \& # way, had we known what values to use. See below: \& \& my $bz = WWW::Bugzilla\->new( server => \*(Aqwww.mybugzilla.com\*(Aq, \& email => \*(Aqbuguser@bug.com\*(Aq, \& password => \*(Aqmypassword\*(Aq \& version => \*(AqAlpha\*(Aq, \& product => \*(AqMyProduct\*(Aq, \& component => \*(AqAPI\*(Aq, \& assigned_to => \*(Aqjoeschmoe@whatever.com\*(Aq, \& summary => $some_text, \& description => $some_more_text); \& \& my $bug_number = $bz\->commit; \& \& # Below is an example of how one would update a bug. \& \& my $bz = WWW::Bugzilla\->new( server => \*(Aqwww.mybugzilla.com\*(Aq, \& email => \*(Aqbuguser@bug.com\*(Aq, \& password => \*(Aqmypassword\*(Aq \& bug_number => 46 ); \& \& # show me the chosen component \& my $component = $bz\->component; \& \& # change component \& $bz\->component( \*(AqTest Failures\*(Aq ); \& \& $bz\->add_cc( \*(Aqme@me.org\*(Aq ); \& \& $bz\->add_attachment( filepath => \*(Aq/home/me/file.txt\*(Aq, \& description => \*(Aqdescription text\*(Aq, \& is_patch => 0, \& comment => \*(Aqcomment text here\*(Aq ); \& \& $bz\->additional_comments( "comments here"); \& \& # below are examples of changing bug status \& $bz\->change_status("assigned"); \& $bz\->change_status("fixed"); \& $bz\->change_status("later"); \& $bz\->mark_as_duplicate("12"); \& $bz\->reassign("someone@else.com"); \& \& $bz\->commit; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" WWW::Bugzilla currently provides an \s-1API\s0 to posting new Bugzilla bugs, as well as updating existing Bugzilla bugs. .SH "INTERFACE" .IX Header "INTERFACE" .SS "\s-1METHODS\s0" .IX Subsection "METHODS" .IP "\fBnew()\fR" 4 .IX Item "new()" Initialize WWW::Bugzilla object. If bug_number is passed in, will initialize as existing bug. Will \fBcroak()\fR unless the Bugzilla login page on server specified returns a 200 or 404. \&\fBnew()\fR supports the following name-value parameters. .RS 4 .IP "server (required)" 4 .IX Item "server (required)" \&\s-1URL\s0 of the bugzilla server you wish to interface with. Do not place http:// or https:// in front of the url (see 'use_ssl' option below) .IP "email (required)" 4 .IX Item "email (required)" Your email address used by bugzilla, in other words your bugzilla login. .IP "password (required)" 4 .IX Item "password (required)" Bugzilla password. .IP "use_ssl (optional)" 4 .IX Item "use_ssl (optional)" If set, will use https:// protocol, defaults to http://. .Sp \&\s-1NOTE:\s0 This option requires Crypt::SSLeay. .IP "product" 4 .IX Item "product" Bugzilla product name, required if entering new bug (not updating). .IP "bug_number (optional)" 4 .IX Item "bug_number (optional)" If you mean to update an existing bug (not create a new one) include a valid bug number here. .IP "version component status assigned_to resolution dup_id assigned_to summary bug_number description os platform severity priority cc url add_cc target_milestone status_whiteboard keywords depends_on blocks additional_comments" 4 .IX Item "version component status assigned_to resolution dup_id assigned_to summary bug_number description os platform severity priority cc url add_cc target_milestone status_whiteboard keywords depends_on blocks additional_comments" These are fields that can be initialized on \fBnew()\fR, useful for new bugs. Please note that some of these fields apply only to bugs being updated, and if you set them here, they will be overridden if the value is already set in the actual bug on the server. These fields also have their own get/set methods (see below). .RE .RS 4 .RE .IP "\fBproduct()\fR \fBversion()\fR \fBcomponent()\fR \fBstatus()\fR \fBassigned_to()\fR \fBresolution()\fR \fBdup_id()\fR \fBassigned_to()\fR \fBsummary()\fR \fBbug_number()\fR \fBdescription()\fR \fBos()\fR \fBplatform()\fR \fBseverity()\fR \fBpriority()\fR \fBcc()\fR \fBurl()\fR \fBadd_cc()\fR \fBtarget_milestone()\fR \fBstatus_whiteboard()\fR \fBkeywords()\fR \fBdepends_on()\fR \fBblocks()\fR \fBadditional_comments()\fR" 4 .IX Item "product() version() component() status() assigned_to() resolution() dup_id() assigned_to() summary() bug_number() description() os() platform() severity() priority() cc() url() add_cc() target_milestone() status_whiteboard() keywords() depends_on() blocks() additional_comments()" get/set the value of these bug fields. Some apply only to new bugs, some only to bugs being updated. \fBcommit()\fR must be called to save these permanently. .IP "\fBavailable()\fR" 4 .IX Item "available()" Returns list of available options for field requested. Below are known valid fields: .Sp product platform os version priority severity component target_milestone .IP "\fBproduct()\fR" 4 .IX Item "product()" Set the Product for the bug .IP "\fBreassign()\fR" 4 .IX Item "reassign()" Mark bug being updated as reassigned to another user. Takes email address as parameter. Status/resolution will not be updated until \fBcommit()\fR is called. .IP "\fBmark_as_duplicate()\fR" 4 .IX Item "mark_as_duplicate()" Mark bug being updated as duplicate of another bug number. Takes bug number as argument. Status/resolution will not be updated until \fBcommit()\fR is called. .IP "\fBchange_status()\fR" 4 .IX Item "change_status()" Change status of bug being updated. Status/resolution will not be updated until \fBcommit()\fR is called. The following are valid options (case-insensitive): .Sp assigned fixed invalid wontfix later remind worksforme reopen verified closed .IP "\fBadd_attachment()\fR" 4 .IX Item "add_attachment()" Adds attachment to existing bug \- will not work for new bugs. Below are available params: .RS 4 .IP "\(bu" 4 filepath (required) .IP "\(bu" 4 description (required) .IP "\(bu" 4 is_patch (optional boolean) .IP "\(bu" 4 content_type \- Autodetected if not defined. .IP "\(bu" 4 comment (optional) .IP "\(bu" 4 finished \- will not return object to update form if set (optional boolean) .RE .RS 4 .RE .IP "\fBlist_attachments()\fR" 4 .IX Item "list_attachments()" Lists attachments that are attached to an existing bug \- will not work for new bugs. .IP "\fBget_attachment()\fR" 4 .IX Item "get_attachment()" Get the specified attachment from an existing bug \- will not work for new bugs. .IP "\fBobsolete_attachment()\fR" 4 .IX Item "obsolete_attachment()" Mark the specified attachment obsolete. \- will not work for new bugs. .IP "\fBcommit()\fR" 4 .IX Item "commit()" Submits bugzilla new or update form. Returns bug_number. Optionally takes parameter finished\- if set will you are done updating the bug, and wil not return you to the update page. .IP "check_error ()" 4 .IX Item "check_error ()" Checks if an error was given, croaking if it did. .IP "get_products ()" 4 .IX Item "get_products ()" Gets a list of products .IP "\fBget_comments()\fR" 4 .IX Item "get_comments()" Lists comments made on an existing bug \- will not work for new bugs. .SH "BUGS, IMPROVEMENTS" .IX Header "BUGS, IMPROVEMENTS" There may well be bugs in this module. Using it as I have, I just have not run into any. In addition, this module does not support \s-1ALL\s0 of Bugzilla's features. I will consider any patches or improvements, just send me an email at the address listed below. .SH "AUTHOR" .IX Header "AUTHOR" Maintained by: Brian Caswell, bmc@shmoo.com .PP Originally written by: Matthew C. Vella, the_mcv@yahoo.com .SH "LICENSE" .IX Header "LICENSE" .Vb 2 \& WWW::Bugzilla \- Module providing API to create or update Bugzilla bugs. \& Copyright (C) 2003 Matthew C. Vella (the_mcv@yahoo.com) \& \& Portions Copyright (C) 2006 Brian Caswell (bmc@shmoo.com) \& \& This module is free software; you can redistribute it and/or modify it \& under the terms of either: \& \& a) the GNU General Public License as published by the Free Software \& Foundation; either version 1, or (at your option) any later version, \& or \& \& b) the "Artistic License" which comes with this module. \& \& This program is distributed in the hope that it will be useful, \& but WITHOUT ANY WARRANTY; without even the implied warranty of \& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either \& the GNU General Public License or the Artistic License for more details. \& \& You should have received a copy of the Artistic License with this \& module, in the file ARTISTIC. If not, I\*(Aqll be glad to provide one. \& \& You should have received a copy of the GNU General Public License \& along with this program; if not, write to the Free Software \& Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 \& USA .Ve