1bugzilla(1)                      User Commands                     bugzilla(1)
2
3
4

NAME

6       bugzilla - command-line interface to Bugzilla over XML-RPC
7

SYNOPSIS

9       bugzilla [options] [command] [command-options]
10

DESCRIPTION

12       bugzilla  is  a  command-line utility that allows access to the XML-RPC
13       interface provided by Bugzilla.
14
15       command is one of:
16        * login - log into the given bugzilla instance
17        * new - create a new bug
18        * query - search for bugs matching given criteria
19        * modify - modify existing bugs
20        * attach - attach files to existing bugs, or get attachments
21        * info - get info about the given bugzilla instance
22

GLOBAL OPTIONS

24       --version
25              show program's version number and exit
26
27       --help, -h
28              show this help message and exit
29
30       --bugzilla=BUGZILLA
31              bugzilla XMLRPC URI.  default:  https://bugzilla.redhat.com/xml
32              rpc.cgi
33
34       --nosslverify
35              Don't error on invalid bugzilla SSL certificate
36
37       --cert=CERTFILE
38              client side certificate file needed by the webserver.
39
40       --login
41              Run interactive "login" before performing the specified command.
42
43       --username=USERNAME
44              Log in with this username
45
46       --password=PASSWORD
47              Log in with this password
48
49       --restrict-login
50              The  session  (login token) will be restricted to the current IP
51              address.
52
53       --ensure-logged-in
54              Raise an error if we aren't  logged  in  to  bugzilla.  Consider
55              using this if you are depending on cached credentials, to ensure
56              that when they expire the tool errors, rather than subtly change
57              output.
58
59       --no-cache-credentials
60              Don't save any bugzilla cookies or tokens to disk, and don't use
61              any pre-existing credentials.
62
63       --cookiefile=COOKIEFILE
64              cookie file to use for bugzilla authentication
65
66       --tokenfile=TOKENFILE
67              token file to use for bugzilla authentication
68
69       --verbose
70              give more info about what's going on
71
72       --debug
73              output bunches of debugging info
74
75       --version
76              show program's version number and exit
77
78

Standard bugzilla options

80       These options are shared by some combination of the 'new', 'query', and
81       'modify' sub commands. Not every option works for each command though.
82
83
84       --product=PRODUCT, -p PRODUCT
85              Product name
86
87       --version=VERSION, -v VERSION
88              Product version
89
90       --component=COMPONENT, -c COMPONENT
91              Component name
92
93       --summary=SUMMARY, -s SUMMARY, --short_desc=SUMMARY
94              Bug summary
95
96       --comment=DESCRIPTION, -l DESCRIPTION
97              Set initial bug comment/description
98
99       --comment-tag=TAG
100              Comment tag for the new comment
101
102       --sub-component=SUB_COMPONENT
103              RHBZ sub component name
104
105       --os=OS, -o OS
106              Operating system
107
108       --arch=ARCH
109              Arch this bug occurs on
110
111       --severity=SEVERITY, -x SEVERITY
112              Bug severity
113
114       --priority=PRIORITY, -z PRIORITY
115              Bug priority
116
117       --alias=ALIAS
118              Bug alias (name)
119
120       --status=STATUS, -s STATUS, --bug_status=STATUS
121              Bug status (NEW, ASSIGNED, etc.)
122
123       --url=URL, -u URL
124              URL for further bug info
125
126       --target_milestone=TARGET_MILESTONE, -m TARGET_MILESTONE
127              Target milestone
128
129       --target_release=TARGET_RELEASE
130              RHBZ Target release
131
132       --blocked=BUGID[, BUGID, ...]
133              Bug IDs that this bug blocks
134
135       --dependson=BUGID[, BUGID, ...]
136              Bug IDs that this bug depends on
137
138       --keywords=KEYWORD[, KEYWORD, ...]
139              Bug keywords
140
141       --groups=GROUP[, GROUP, ...]
142              Which user groups can view this bug
143
144       --cc=CC[, CC, ...]
145              CC list
146
147       --assigned_to=ASSIGNED_TO, -a ASSIGNED_TO, --assignee ASSIGNED_TO
148              Bug assignee
149
150       --qa_contact=QA_CONTACT, -q QA_CONTACT
151              QA contact
152
153       --flag=FLAG
154              Set or unset a flag. For example, to set a flag named devel_ack,
155              do --flag devel_ack+  Unset a flag  with  the  'X'  value,  like
156              --flag needinfoX
157
158       --tags=TAG
159              Set (personal) tags field
160
161       --whiteboard WHITEBOARD, -w WHITEBOARD, --status_whiteboard WHITEBOARD
162              Whiteboard field
163
164       --devel_whiteboard DEVEL_WHITEBOARD
165              RHBZ devel whiteboard field
166
167       --internal_whiteboard INTERNAL_WHITEBOARD
168              RHBZ internal whiteboard field
169
170       --qa_whiteboard QA_WHITEBOARD
171              RHBZ QA whiteboard field
172
173       --fixed_in FIXED_IN, -F FIXED_IN
174              RHBZ 'Fixed in version' field
175
176       --field=FIELD=VALUE
177              Manually  specify a bugzilla XMLRPC field. FIELD is the raw name
178              used by the bugzilla instance.  For  example  if  your  bugzilla
179              instance   has   a   custom   field   cf_my_field,  do:  --field
180              cf_my_field=VALUE
181
182
183

Output options

185       These options are shared by several commands,  for  tweaking  the  text
186       output of the command results.
187
188       --full, -f
189              output detailed bug info
190
191       --ids, -i
192              output only bug IDs
193
194       --extra, -e
195              output additional bug information (keywords, Whiteboards, etc.)
196
197       --oneline
198              one line summary of the bug (useful for scripts)
199
200       --raw  raw output of the bugzilla contents
201
202       --outputformat=OUTPUTFORMAT
203              Print  output in the form given. You can use RPM-style tags that
204              match bug fields, e.g.: '%{id}: %{summary}'.
205
206              The output of the bugzilla tool should NEVER  BE  PARSED  unless
207              you are using a custom --outputformat. For everything else, just
208              don't parse it, the formats are not stable and  are  subject  to
209              change.
210
211              --outputformat allows printing arbitrary bug data in a user pre‐
212              ferred format.  For example, to print a returned bug ID,  compo‐
213              nent, and product, separated with ::, do:
214
215              --outputformat "%{id}::%{component}::%{product}"
216
217              The  fields  (like 'id', 'component', etc.) are the names of the
218              values returned by bugzilla's XMLRPC interface. To see a list of
219              all  fields,  check the API documentation in the 'SEE ALSO' sec‐
220              tion. Alternatively, run a 'bugzilla --debug query ...' and look
221              at  the  key names returned in the query results.  Also, in most
222              cases, using the name of  the  associated  command  line  switch
223              should work, like --bug_status becomes %{bug_status}, etc.
224
225
226

‘query’ specific options

228       Certain  options  can  accept  a comma separated list to query multiple
229       values, including --status, --component, --product, --version, --id.
230
231       Note: querying via explicit command line options will only get  you  so
232       far. See the --from-url option for a way to use powerful Web UI queries
233       from the command line.
234
235       --id ID, -b ID, --bug_id ID
236              specify individual bugs by IDs, separated with commas
237
238       --reporter REPORTER, -r REPORTER
239              Email: search reporter email for given address
240
241       --quicksearch QUICKSEARCH
242              Search using bugzilla's quicksearch functionality.
243
244       --savedsearch SAVEDSEARCH
245              Name of a bugzilla saved search. If you  don't  own  this  saved
246              search, you must passed --savedsearch_sharer_id.
247
248       --savedsearch-sharer-id SAVEDSEARCH_SHARER_ID
249              Owner  ID of the --savedsearch. You can get this ID from the URL
250              bugzilla generates when running the saved search  from  the  web
251              UI.
252
253       --from-url WEB_QUERY_URL
254              Make  a  working  query via bugzilla's 'Advanced search' web UI,
255              grab the url from your browser (the  string  with  query.cgi  or
256              buglist.cgi  in it), and --from-url will run it via the bugzilla
257              API. Don't forget to quote  the  string!  This  only  works  for
258              Bugzilla 5 and Red Hat bugzilla
259
260
261

‘modify’ specific options

263       Fields that take multiple values have a special input format.
264
265        Append:    --cc=foo@example.com
266        Overwrite: --cc==foo@example.com
267        Remove:    --cc=-foo@example.com
268
269       Options   that   accept  this  format:  --cc,  --blocked,  --dependson,
270       --groups, --tags, whiteboard fields.
271
272       --close RESOLUTION, -k RESOLUTION
273              Close with the given resolution (WONTFIX, NOTABUG, etc.)
274
275       --dupeid ORIGINAL, -d ORIGINAL
276              ID of original bug. Implies --close DUPLICATE
277
278       --private
279              Mark new comment as private
280
281       --reset-assignee
282              Reset assignee to component default
283
284       --reset-qa-contact
285              Reset QA contact to component default
286
287
288

‘attach’ options

290       --file=FILENAME, -f FILENAME
291              File to attach, or filename for data provided on stdin
292
293       --description=DESCRIPTION, -d DESCRIPTION
294              A short description of the file being attached
295
296       --type=MIMETYPE, -t MIMETYPE
297              Mime-type for the file being attached
298
299       --get=ATTACHID, -g ATTACHID
300              Download the attachment with the given ID
301
302       --getall=BUGID, --get-all=BUGID
303              Download all attachments on the given bug
304
305       --comment=COMMENT, -l COMMENT
306              Add comment with attachment
307
308
309

‘info’ options

311       --products, -p
312              Get a list of products
313
314       --components=PRODUCT, -c PRODUCT
315              List the components in the given product
316
317       --component_owners=PRODUCT, -o PRODUCT
318              List components (and their owners)
319
320       --versions=PRODUCT, -v PRODUCT
321              List the versions for the given product
322
323       --active-components
324              Only show active components. Combine with --components*
325
326
327

AUTHENTICATION CACHE AND API KEYS

329       Some command usage  will  require  an  active  login  to  the  bugzilla
330       instance.  For example, if the bugzilla instance has some private bugs,
331       those bugs will be missing from 'query' output if you do  not  have  an
332       active login.
333
334       If  you  are  connecting  to a bugzilla 5.0 or later instance, the best
335       option is to use bugzilla API keys. From the bugzilla web UI,  log  in,
336       navigate  to  Preferences->API  Keys,  and generate a key (it will be a
337       long  string  of  characters  and  numbers).   Then  create  a  ~/.con‐
338       fig/python-bugzilla/bugzillarc like this:
339
340         $ cat ~/.config/python-bugzilla/bugzillarc
341         [bugzilla.example.com]
342         api_key=YOUR_API_KEY
343
344       Replace  'bugzilla.example.com'  with  your  bugzilla  host  name,  and
345       YOUR_API_KEY with the generated API Key from the Web UI.
346
347       For older bugzilla instances, you will need to cache a login cookie  or
348       token with the "login" subcommand or the "--login" argument.
349
350       Additionally,  the --no-cache-credentials option will tell the bugzilla
351       tool to _not_ save or  use  any  authentication  cache,  including  the
352       bugzillarc file.
353
354

EXAMPLES

356       bugzilla query --bug_id 62037
357
358       bugzilla query --version 15 --component python-bugzilla
359
360       # All boolean options can be formatted like this
361       bugzilla query --blocked "123456 | 224466"
362
363       bugzilla login
364
365       bugzilla new -p Fedora -v rawhide -c python-bugzilla \
366                --summary "python-bugzilla causes headaches" \
367                --comment "python-bugzilla made my brain hurt when I used it."
368
369       bugzilla attach --file ~/Pictures/cam1.jpg --desc "me, in pain" $BUGID
370
371       bugzilla attach --getall $BUGID
372
373       bugzilla  modify --close NOTABUG --comment "Actually, you're hungover."
374       $BUGID
375
376
377

EXIT STATUS

379       bugzilla normally returns 0 if the requested  command  was  successful.
380       Otherwise,  exit status is 1 if bugzilla is interrupted by the user (or
381       a login attempt fails), 2 if a socket error occurs (e.g. TCP connection
382       timeout), and 3 if the server returns an XML-RPC fault.
383

BUGS

385       Please report any bugs as github issues at
386       https://github.com/python-bugzilla/python-bugzilla
387       to the mailing list at
388       https://fedorahosted.org/mailman/listinfo/python-bugzilla
389

SEE ALSO

391       https://bugzilla.readthedocs.io/en/latest/api/index.html
392       https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html
393
394
395
396version 2.1.0                    Mar 30, 2017                      bugzilla(1)
Impressum