1BUGZILLA(1) User Commands BUGZILLA(1)
2
3
4
6 bugzilla - command line tool for interacting with Bugzilla
7
9 bugzilla [options] [command] [command-options]
10
12 bugzilla is a command line tool for interacting with a Bugzilla
13 instance over REST or XMLRPC.
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
23
25 --help, -h
26 Syntax: -h
27
28 show this help message and exit
29
30 --bugzilla
31 Syntax: --bugzilla BUGZILLA
32
33 The bugzilla URL. Full API URLs are typically like:
34
35 * https://bugzilla.example.com/xmlrpc.cgi # XMLRPC API
36 * https://bugzilla.example.com/rest/ # REST API
37
38
39
40 If a non-specific URL is passed, like 'bugzilla.redhat.com', bugzilla
41 will try to probe whether the expected XMLRPC or REST path is avail‐
42 able, preferring XMLRPC for backwards compatibility.
43
44 The default URL https://bugzilla.redhat.com
45
46 --nosslverify
47 Syntax: --nosslverify
48
49 Don't error on invalid bugzilla SSL certificate
50
51 --cert
52 Syntax: --cert CERTFILE
53
54 client side certificate file needed by the webserver.
55
56 --login
57 Syntax: --login
58
59 Run interactive "login" before performing the specified command.
60
61 --username
62 Syntax: --username USERNAME
63
64 Log in with this username
65
66 --password
67 Syntax: --password PASSWORD
68
69 Log in with this password
70
71 --restrict-login
72 Syntax: --restrict-login
73
74 The session (login token) will be restricted to the current IP address.
75
76 --ensure-logged-in
77 Syntax: --ensure-logged-in
78
79 Raise an error if we aren't logged in to bugzilla. Consider using this
80 if you are depending on cached credentials, to ensure that when they
81 expire the tool errors, rather than subtly change output.
82
83 --no-cache-credentials
84 Syntax: --no-cache-credentials
85
86 Don't save any bugzilla cookies or tokens to disk, and don't use any
87 pre-existing credentials.
88
89 --cookiefile
90 Syntax: --cookiefile COOKIEFILE
91
92 cookie file to use for bugzilla authentication
93
94 --tokenfile
95 Syntax: --tokenfile TOKENFILE
96
97 token file to use for bugzilla authentication
98
99 --verbose
100 Syntax: --verbose
101
102 give more info about what's going on
103
104 --debug
105 Syntax: --debug
106
107 output bunches of debugging info
108
109 --version
110 Syntax: --version
111
112 show program's version number and exit
113
115 These options are shared by some combination of the 'new', 'query', and
116 'modify' sub commands. Not every option works for each command though.
117
118 -p, --product
119 Syntax: --product PRODUCT
120
121 Product name
122
123 -v, --version
124 Syntax: --version VERSION
125
126 Product version
127
128 -c, --component
129 Syntax: --component COMPONENT
130
131 Component name
132
133 -s, --summary
134 Syntax: --summary SUMMARY
135
136 Bug summary
137
138 -l, --comment
139 Syntax: --comment DESCRIPTION
140
141 Set initial bug comment/description
142
143 --comment-tag
144 Syntax: --comment-tag TAG
145
146 Comment tag for the new comment
147
148 --sub-component
149 Syntax: --sub-component SUB_COMPONENT
150
151 RHBZ sub component name
152
153 -o, --os
154 Syntax: --os OS
155
156 Operating system
157
158 --arch
159 Syntax: --arch ARCH
160
161 Arch this bug occurs on
162
163 -x, --severity
164 Syntax: --severity SEVERITY
165
166 Bug severity
167
168 -z, --priority
169 Syntax: --priority PRIORITY
170
171 Bug priority
172
173 --alias
174 Syntax: --alias ALIAS
175
176 Bug alias (name)
177
178 -s, --status
179 Syntax: --status STATUS
180
181 Bug status (NEW, ASSIGNED, etc.)
182
183 -u, --url
184 Syntax: --url URL
185
186 URL for further bug info
187
188 -m --target_milestone
189 Syntax: --target_milestone TARGET_MILESTONE
190
191 Target milestone
192
193 --target_release
194 Syntax: --target_release TARGET_RELEASE
195
196 RHBZ Target release
197
198 --blocked
199 Syntax: ...]
200
201 Bug IDs that this bug blocks
202
203 --dependson
204 Syntax: ...]
205
206 Bug IDs that this bug depends on
207
208 --keywords
209 Syntax: ...]
210
211 Bug keywords
212
213 --groups
214 Syntax: ...]
215
216 Which user groups can view this bug
217
218 --cc
219 Syntax: ...]
220
221 CC list
222
223 -a, --assignee, --assigned_to
224 Syntax: --assigned_to ASSIGNED_TO
225
226 Bug assignee
227
228 -q, --qa_contact
229 Syntax: --qa_contact QA_CONTACT
230
231 QA contact
232
233 --flag
234 Syntax: --flag FLAG
235
236 Set or unset a flag. For example, to set a flag named devel_ack, do
237 --flag devel_ack+ Unset a flag with the 'X' value, like --flag needin‐
238 foX
239
240 --tags
241 Syntax: --tags TAG
242
243 Set (personal) tags field
244
245 -w, --whiteboard
246 Syntax: --whiteboard WHITEBOARD
247
248 Whiteboard field
249
250 --devel_whiteboard
251 Syntax: --devel_whiteboard DEVEL_WHITEBOARD
252
253 RHBZ devel whiteboard field
254
255 --internal_whiteboard
256 Syntax: --internal_whiteboard INTERNAL_WHITEBOARD
257
258 RHBZ internal whiteboard field
259
260 --qa_whiteboard
261 Syntax: --qa_whiteboard QA_WHITEBOARD
262
263 RHBZ QA whiteboard field
264
265 -F, --fixed_in
266 Syntax: --fixed_in FIXED_IN
267
268 RHBZ 'Fixed in version' field
269
270 --field
271 Syntax: --field FIELD`` VALUE
272
273 Manually specify a bugzilla API field. FIELD is the raw name used by
274 the bugzilla instance. For example if your bugzilla instance has a cus‐
275 tom field cf_my_field, do: --field cf_my_field=VALUE
276
278 These options are shared by several commands, for tweaking the text
279 output of the command results.
280
281 -f, --full
282 Syntax: --full
283
284 output detailed bug info
285
286 -i, --ids
287 Syntax: --ids
288
289 output only bug IDs
290
291 -e, --extra
292 Syntax: --extra
293
294 output additional bug information (keywords, Whiteboards, etc.)
295
296 --oneline
297 Syntax: --oneline
298
299 one line summary of the bug (useful for scripts)
300
301 --json
302 Syntax: --json
303
304 output bug contents in JSON format
305
306 --includefield
307 Syntax: --includefield
308
309 Pass the field name to bugzilla include_fields list. Only the fields
310 passed to include_fields are returned by the bugzilla server. This can
311 be specified multiple times.
312
313 --extrafield
314 Syntax: --extrafield
315
316 Pass the field name to bugzilla extra_fields list. When used with
317 --json this can be used to request bugzilla to return values for
318 non-default fields. This can be specified multiple times.
319
320 --excludefield
321 Syntax: --excludefield
322
323 Pass the field name to bugzilla exclude_fields list. When used with
324 --json this can be used to request bugzilla to not return values for a
325 field. This can be specified multiple times.
326
327 --raw
328 Syntax: --raw
329
330 raw output of the bugzilla contents. This format is unstable and diffi‐
331 cult to parse. Please use the --json instead if you want maximum output
332 from the bugzilla
333
334 --outputformat
335 Syntax: --outputformat OUTPUTFORMAT
336
337 Print output in the form given. You can use RPM-style tags that match
338 bug fields, e.g.: '%{id}: %{summary}'.
339
340 The output of the bugzilla tool should NEVER BE PARSED unless you are
341 using a custom --outputformat. For everything else, just don't parse
342 it, the formats are not stable and are subject to change.
343
344 --outputformat allows printing arbitrary bug data in a user preferred
345 format. For example, to print a returned bug ID, component, and prod‐
346 uct, separated with ::, do:
347
348 --outputformat "%{id}::%{component}::%{product}"
349
350 The fields (like 'id', 'component', etc.) are the names of the values
351 returned by bugzilla's API. To see a list of all fields, check the API
352 documentation in the 'SEE ALSO' section. Alternatively, run a 'bugzilla
353 --debug query ...' and look at the key names returned in the query
354 results. Also, in most cases, using the name of the associated command
355 line switch should work, like --bug_status becomes %{bug_status}, etc.
356
358 Certain options can accept a comma separated list to query multiple
359 values, including --status, --component, --product, --version, --id.
360
361 Note: querying via explicit command line options will only get you so
362 far. See the --from-url option for a way to use powerful Web UI queries
363 from the command line.
364
365 -b, --bug_id, --id
366 Syntax: --id ID
367
368 specify individual bugs by IDs, separated with commas
369
370 -r, --reporter
371 Syntax: --reporter REPORTER
372
373 Email: search reporter email for given address
374
375 --quicksearch
376 Syntax: --quicksearch QUICKSEARCH
377
378 Search using bugzilla's quicksearch functionality.
379
380 --savedsearch
381 Syntax: --savedsearch SAVEDSEARCH
382
383 Name of a bugzilla saved search. If you don't own this saved search,
384 you must passed --savedsearch_sharer_id.
385
386 --savedsearch-sharer-id
387 Syntax: --savedsearch-sharer-id SAVEDSEARCH_SHARER_ID
388
389 Owner ID of the --savedsearch. You can get this ID from the URL
390 bugzilla generates when running the saved search from the web UI.
391
392 --from-url
393 Syntax: --from-url WEB_QUERY_URL
394
395 Make a working query via bugzilla's 'Advanced search' web UI, grab the
396 url from your browser (the string with query.cgi or buglist.cgi in it),
397 and --from-url will run it via the bugzilla API. Don't forget to quote
398 the string! This only works for Bugzilla 5 and Red Hat bugzilla
399
401 Fields that take multiple values have a special input format.
402 Append: --cc=foo@example.com
403 Overwrite: --cc==foo@example.com
404 Remove: --cc=-foo@example.com
405
406
407 Options that accept this format: --cc, --blocked, --dependson,
408 --groups, --tags, whiteboard fields.
409
410 -k, --close RESOLUTION
411 Syntax: RESOLUTION
412
413 Close with the given resolution (WONTFIX, NOTABUG, etc.)
414
415 -d, --dupeid
416 Syntax: --dupeid ORIGINAL
417
418 ID of original bug. Implies --close DUPLICATE
419
420 --private
421 Syntax: --private
422
423 Mark new comment as private
424
425 --reset-assignee
426 Syntax: --reset-assignee
427
428 Reset assignee to component default
429
430 --reset-qa-contact
431 Syntax: --reset-qa-contact
432
433 Reset QA contact to component default
434
435 --minor-update
436 Syntax: --minor-update
437
438 Request bugzilla to not send any email about this change
439
441 --private
442 Syntax: --private
443
444 Mark new comment as private
445
447 -f, --file
448 Syntax: --file FILENAME
449
450 File to attach, or filename for data provided on stdin
451
452 -d, --description
453 Syntax: --description DESCRIPTION
454
455 A short description of the file being attached
456
457 -t, --type
458 Syntax: --type MIMETYPE
459
460 Mime-type for the file being attached
461
462 -g, --get
463 Syntax: --get ATTACHID
464
465 Download the attachment with the given ID
466
467 --getall
468 Syntax: --getall BUGID
469
470 Download all attachments on the given bug
471
472 --ignore-obsolete
473 Syntax: --ignore-obsolete
474
475 Do not download attachments marked as obsolete.
476
477 -l, --comment
478 Syntax: --comment COMMENT
479
480 Add comment with attachment
481
483 -p, --products
484 Syntax: --products
485
486 Get a list of products
487
488 -c, --components
489 Syntax: --components PRODUCT
490
491 List the components in the given product
492
493 -o, --component_owners
494 Syntax: --component_owners PRODUCT
495
496 List components (and their owners)
497
498 -v, --versions
499 Syntax: --versions PRODUCT
500
501 List the versions for the given product
502
503 --active-components
504 Syntax: --active-components
505
506 Only show active components. Combine with --components*
507
509 Some command usage will require an active login to the bugzilla
510 instance. For example, if the bugzilla instance has some private bugs,
511 those bugs will be missing from 'query' output if you do not have an
512 active login.
513
514 If you are connecting to a bugzilla 5.0 or later instance, the best
515 option is to use bugzilla API keys. From the bugzilla web UI, log in,
516 navigate to Preferences->API Keys, and generate a key (it will be a
517 long string of characters and numbers). Then create a ~/.con‐
518 fig/python-bugzilla/bugzillarc like this:
519
520 $ cat ~/.config/python-bugzilla/bugzillarc
521
522 [bugzilla.example.com]
523 api_key=YOUR_API_KEY
524
525 Replace 'bugzilla.example.com' with your bugzilla host name, and
526 YOUR_API_KEY with the generated API Key from the Web UI.
527
528 Alternatively, you can use 'bugzilla login --api-key', which will ask
529 for the API key, and save it to bugzillarc for you.
530
531 For older bugzilla instances, you will need to cache a login cookie or
532 token with the "login" subcommand or the "--login" argument.
533
534 Additionally, the --no-cache-credentials option will tell the bugzilla
535 tool to not save or use any authentication cache, including the bugzil‐
536 larc file.
537
539 bugzilla query --bug_id 62037
540
541 bugzilla query --version 15 --component python-bugzilla
542
543 bugzilla login
544
545 bugzilla new -p Fedora -v rawhide -c python-bugzilla \
546 --summary "python-bugzilla causes headaches" \
547 --comment "python-bugzilla made my brain hurt when I used it."
548
549 bugzilla attach --file ~/Pictures/cam1.jpg --desc "me, in pain"
550 $BUGID
551
552 bugzilla attach --getall $BUGID
553
554 bugzilla modify --close NOTABUG --comment "Actually, you're
555 hungover." $BUGID
556
557
559 bugzilla normally returns 0 if the requested command was successful.
560 Otherwise, exit status is 1 if bugzilla is interrupted by the user (or
561 a login attempt fails), 2 if a socket error occurs (e.g. TCP connection
562 timeout), and 3 if the Bugzilla server throws an error.
563
565 Please report any bugs as github issues at
566 https://github.com/python-bugzilla/python-bugzilla
567
569 https://bugzilla.readthedocs.io/en/latest/api/index.html
570 https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html
571
572
573
574
575 BUGZILLA(1)