1WWW::Bugzilla(3)      User Contributed Perl Documentation     WWW::Bugzilla(3)
2
3
4

NAME

6       WWW::Bugzilla - Handles submission/update of bugzilla bugs via
7       WWW::Mechanize.
8

SYNOPSIS

10           use WWW::Bugzilla;
11
12           # create new bug
13           my $bz = WWW::Bugzilla->new(    server => 'www.mybugzilla.com',
14                                           email => 'buguser@bug.com',
15                                           password => 'mypassword' );
16
17           # enter info into some fields and save new bug
18
19           # get list of available version choices
20           my @versions = $bz->available('version');
21
22           # set version
23           $bz->version( $versions[0] );
24
25           # get list of available products
26           my @products = $bz->available('product');
27
28           # set product
29           $bz->product( $products[0] );
30
31           # get list of components available
32           my @components = $bz->available('component');
33
34           # set component
35           $bz->component( $components[0] );
36
37           # optionally do the same for platform, os, priority, severity.
38
39           $bz->assigned_to( 'joeschmoe@whatever.com' );
40           $bz->summary( $some_text );
41           $bz->description( $some_more_text );
42
43           # submit bug, returning new bug number
44           my $bug_number = $bz->commit;
45
46           # all of the above could have been done in a much easier
47           # way, had we known what values to use. See below:
48
49           my $bz = WWW::Bugzilla->new(    server => 'www.mybugzilla.com',
50                                           email => 'buguser@bug.com',
51                                           password => 'mypassword'
52                                           version => 'Alpha',
53                                           product => 'MyProduct',
54                                           component => 'API',
55                                           assigned_to => 'joeschmoe@whatever.com',
56                                           summary => $some_text,
57                                           description => $some_more_text);
58
59           my $bug_number = $bz->commit;
60
61           # Below is an example of how one would update a bug.
62
63           my $bz = WWW::Bugzilla->new(    server => 'www.mybugzilla.com',
64                                           email => 'buguser@bug.com',
65                                           password => 'mypassword'
66                                           bug_number => 46 );
67
68           # show me the chosen component
69           my $component = $bz->component;
70
71           # change component
72           $bz->component( 'Test Failures' );
73
74           $bz->add_cc( 'me@me.org' );
75
76           $bz->add_attachment(    filepath => '/home/me/file.txt',
77                                   description => 'description text',
78                                   is_patch => 0,
79                                   comment => 'comment text here' );
80
81           $bz->additional_comments( "comments here");
82
83           # below are examples of changing bug status
84           $bz->change_status("assigned");
85           $bz->change_status("fixed");
86           $bz->change_status("later");
87           $bz->mark_as_duplicate("12");
88           $bz->reassign("someone@else.com");
89
90           $bz->commit;
91

DESCRIPTION

93       WWW::Bugzilla currently provides an API to posting new Bugzilla bugs,
94       as well as updating existing Bugzilla bugs.
95

INTERFACE

97   METHODS
98       new()
99           Initialize WWW::Bugzilla object.  If bug_number is passed in, will
100           initialize as existing bug. Will croak() unless the Bugzilla login
101           page on server specified returns a 200 or 404.  new() supports the
102           following name-value parameters.
103
104           server (required)
105               URL of the bugzilla server you wish to interface with. Do not
106               place http:// or https:// in front of the url (see 'use_ssl'
107               option below)
108
109           email (required)
110               Your email address used by bugzilla, in other words your
111               bugzilla login.
112
113           password (required)
114               Bugzilla password.
115
116           use_ssl (optional)
117               If set, will use https:// protocol, defaults to http://.
118
119               NOTE: This option requires Crypt::SSLeay.
120
121           product
122               Bugzilla product name, required if entering new bug (not
123               updating).
124
125           bug_number (optional)
126               If you mean to update an existing bug (not create a new one)
127               include a valid bug number here.
128
129           version component status assigned_to resolution dup_id assigned_to
130           summary bug_number description os platform severity priority cc url
131           add_cc target_milestone status_whiteboard keywords depends_on
132           blocks additional_comments
133               These are fields that can be initialized on new(), useful for
134               new bugs.  Please note that some of these fields apply only to
135               bugs being updated, and if you set them here, they will be
136               overridden if the value is already set in the actual bug on the
137               server.  These fields also have thier own get/set methods (see
138               below).
139
140       product() version() component() status() assigned_to() resolution()
141       dup_id() assigned_to() summary() bug_number() description() os()
142       platform() severity() priority() cc() url() add_cc() target_milestone()
143       status_whiteboard() keywords() depends_on() blocks()
144       additional_comments()
145           get/set the value of these bug fields.  Some apply only to new
146           bugs, some only to bugs being updated. commit() must be called to
147           save these permanently.
148
149       available()
150           Returns list of available options for field requested. Below are
151           known valid fields:
152
153           product platform os version priority severity component
154           target_milestone
155
156       product()
157           Set the Product for the bug
158
159       reassign()
160           Mark bug being updated as reassigned to another user. Takes email
161           address as parameter.  Status/resolution will not be updated until
162           commit() is called.
163
164       mark_as_duplicate()
165           Mark bug being updated as duplicate of another bug number.  Takes
166           bug number as argument.  Status/resolution will not be updated
167           until commit() is called.
168
169       change_status()
170           Change status of bug being updated.  Status/resolution will not be
171           updated until commit() is called.  The following are valid options
172           (case-insensitive):
173
174           assigned fixed invalid wontfix later remind worksforme reopen
175           verified closed
176
177       add_attachment()
178           Adds attachment to existing bug - will not work for new bugs.
179           Below are available params:
180
181           ·   filepath (required)
182
183           ·   description (required)
184
185           ·   is_patch (optional boolean)
186
187           ·   content_type - Autodetected if not defined.
188
189           ·   comment (optional)
190
191           ·   finished - will not return object to update form if set
192               (optional boolean)
193
194       list_attachments()
195           Lists attachments that are attached to an existing bug - will not
196           work for new bugs.
197
198       get_attachment()
199           Get the specified attachment from an existing bug - will not work
200           for new bugs.
201
202       obsolete_attachment()
203           Mark the specified attachment obsolete.  - will not work for new
204           bugs.
205
206       commit()
207           Submits bugzilla new or update form. Returns bug_number. Optionally
208           takes parameter finished- if set will you are done updating the
209           bug, and wil not return you to the update page.
210
211       check_error ()
212           Checks if an error was given, croaking if it did.
213
214       get_products ()
215           Gets a list of products
216
217       get_comments()
218           Lists comments made on an existing bug - will not work for new
219           bugs.
220

BUGS, IMPROVEMENTS

222       There may well be bugs in this module.  Using it as I have, I just have
223       not run into any.  In addition, this module does not support ALL of
224       Bugzilla's features.  I will consider any patches or improvements, just
225       send me an email at the address listed below.
226

AUTHOR

228       Maintained by:
229           Brian Caswell, bmc@shmoo.com
230
231       Originally written by:
232           Matthew C. Vella, the_mcv@yahoo.com
233

LICENSE

235         WWW::Bugzilla - Module providing API to create or update Bugzilla bugs.
236         Copyright (C) 2003 Matthew C. Vella (the_mcv@yahoo.com)
237
238         Portions Copyright (C) 2006 Brian Caswell (bmc@shmoo.com)
239
240         This module is free software; you can redistribute it and/or modify it
241         under the terms of either:
242
243         a) the GNU General Public License as published by the Free Software
244         Foundation; either version 1, or (at your option) any later version,
245         or
246
247         b) the "Artistic License" which comes with this module.
248
249         This program is distributed in the hope that it will be useful,
250         but WITHOUT ANY WARRANTY; without even the implied warranty of
251         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See either
252         the GNU General Public License or the Artistic License for more details.
253
254         You should have received a copy of the Artistic License with this
255         module, in the file ARTISTIC.  If not, I'll be glad to provide one.
256
257         You should have received a copy of the GNU General Public License
258         along with this program; if not, write to the Free Software
259         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
260         USA
261
262
263
264perl v5.28.1                      2019-02-02                  WWW::Bugzilla(3)
Impressum