bugzilla(1) command-line interface to Bugzilla over XML-RPC

SYNOPSIS

bugzilla [options] [command] [command-options]

DESCRIPTION

bugzilla is a command-line utility that allows access to the XML-RPC interface provided by Bugzilla.

command is one of:
* login - log into the given bugzilla instance
* new - create a new bug
* query - search for bugs matching given criteria
* modify - modify existing bugs
* attach - attach files to existing bugs, or get attachments
* info - get info about the given bugzilla instance

GLOBAL OPTIONS

--version
show program's version number and exit
--help, -h
show this help message and exit
--bugzilla=BUGZILLA
bugzilla XMLRPC URI. default: https://bugzilla.redhat.com/xmlrpc.cgi
--nosslverify
Don't error on invalid bugzilla SSL certificate
--user=USER
Optional bugzilla login username
--password=PASSWORD
Optional bugzilla login password
--login
Run interactive "login" before performing the specified command.
--ensure-logged-in
Raise an error if we aren't logged in to bugzilla. Consider using this if you are depending on cached credentials, to ensure that when they expire the tool errors, rather than subtly change output.
--no-cache-credentials
Don't save any bugzilla cookies or tokens to disk, and don't use any pre-existing credentials.
--cookiefile=COOKIEFILE
cookie file to use for bugzilla authentication
--tokenfile=TOKENFILE
token file to use for bugzilla authentication
--verbose
give more info about what's going on
--debug
output bunches of debugging info

'NEW' OPTIONS

--product=PRODUCT, -p PRODUCT
REQUIRED: product name
--version=VERSION, -v VERSION
REQUIRED: product version
--component=COMPONENT, -c COMPONENT
REQUIRED: component name
--sub-component=SUB_COMPONENT
Optional sub component name
--short_desc=SUMMARY, --summary=SUMMARY, -s SUMMARY
REQUIRED: bug summary
--comment=DESCRIPTION, -l DESCRIPTION
initial bug comment
--os=OS, -o OS
Operating system
--arch=ARCH, -a ARCH
Arch this bug occurs on
--severity=SEVERITY
Bug severity
--priority=PRIORITY
Bug priority
--url=URL, -u URL
URL for further bug info
--cc=CC[, CC, ...]
add emails to initial CC list
--blocked=BUGID[, BUGID, ...]
add bug_ids blocked by this bug
--dependson=BUGID[, BUGID, ...]
add bug_ids that this bug depends on
--groups=GROUP[, GROUP, ...]
add groups to which bug is visible
--assigned_to=ASSIGNED_TO
Assign bugzilla to specified email address
--qa_contact=QA_CONTACT
Set QA contact to specified email address
--keywords=KEYWORD[, KEYWORD, ...]
Set specified keywords on new bugzilla
--alias=ALIAS
An alias (name) for the bug (must be unique)
--field=FIELD=VALUE
Set a specified field. FIELD is expected to be the raw name used by the bugzilla instance. No safety checks are perfomed when using this option.

OUTPUT FORMAT 'NEW' OPTIONS

--full, -f
output detailed bug info
--ids, -i
output only bug IDs
--extra, -e
output additional bug information (keywords, Whiteboards, etc.)
--oneline
one line summary of the bug (useful for scripts)
--raw
raw output of the bugzilla contents
--outputformat=OUTPUTFORMAT
Print output in the form given. You can use RPM-style tags that match bug fields, e.g.: '%{id}: %{summary}'. See the man page section 'OUTPUT FORMAT' for more details.

'QUERY' OPTIONS

--bug_id=BUG_ID, -b BUG_ID
specify individual bugs by IDs, separated with commas
--product=PRODUCT, -p PRODUCT
product name, comma-separated (list with 'bugzilla info --products')
--version=VERSION, -v VERSION
product version, comma-separated
--component=COMPONENT, -c COMPONENT
component name(s), comma-separated (list with 'bugzilla info --components PRODUCT')
--sub-component=SUB_COMPONENT
Sub component. Can be specified multiple times
--components_file=COMPONENTS_FILE
list of component names from a file, one component per line (list with 'bugzilla info -c PRODUCT')
--long_desc=LONG_DESC, -l LONG_DESC
search inside bug comments
--target_milestone=TARGET_MILESTONE, -m TARGET_MILESTONE
search for a target milestone
--short_desc=SHORT_DESC, -s SHORT_DESC
search bug summaries
--bug_status=BUG_STATUS, -t BUG_STATUS
comma-separated list of bug statuses to accept [Default:all]
--bug_severity=BUG_SEVERITY, --severity=BUG_SEVERITY, -x BUG_SEVERITY
search severities, comma-separated
--priority=PRIORITY, -z PRIORITY
search priorities, comma-separated
--from-url=FROM_URL
Use the query given by a query.cgi URL. (Use quotes!)
--quicksearch=QUICKSEARCH
Search using bugzilla's quicksearch functionality.
--savedsearch=SAVEDSEARCH
Name of a bugzilla saved search. If you don't own this saved search, you must passed --savedsearch_sharer_id.
--savedsearch-sharer-id=SAVEDSEARCH_SHARER_ID
Owner ID of the --savedsearch. You can get this ID from the URL bugzilla generates when running the saved search from the web UI.
--field=FIELD=VALUE
Query a specified field. FIELD is expected to be the raw name used by the bugzilla instance. No safety checks are perfomed when using this option.

EMAIL 'QUERY' OPTIONS

--emailtype=EMAILTYPE, -E EMAILTYPE
Email: specify searching option for emails, ie. substring, notsubstring, exact, ... [Default: substring]
--cc=CC, -o CC
Email: search cc lists for given address
--reporter=REPORTER, -r REPORTER
Email: search reporter email for given address
--assigned_to=ASSIGNED_TO, -a ASSIGNED_TO
Email: search for bugs assigned to this address
--qa_contact=QA_CONTACT, -q QA_CONTACT
Email: search for bugs which have QA Contact assigned to this address

STRING SEARCH 'QUERY' OPTIONS

--url=URL, -u URL
search keywords field for given url
--url_type=URL_TYPE, -U URL_TYPE
specify searching option for urls, ie. anywords, allwords, nowords
--keywords=KEYWORDS, -k KEYWORDS
search keywords field for specified words
--keywords_type=KEYWORDS_TYPE, -K KEYWORDS_TYPE
specify searching option for keywords, ie. anywords, allwords, nowords
--status_whiteboard=STATUS_WHITEBOARD, -w STATUS_WHITEBOARD
search Status Whiteboard field for specified words
--status_whiteboard_type=STATUS_WHITEBOARD_TYPE, -W STATUS_WHITEBOARD_TYPE
specify searching option for Status Whiteboard, ie. anywords, allwords, nowords
--tags=TAGS
Search bug 'tags' field

BOOLEAN 'QUERY' OPTIONS

--booleantype=BOOLEANTYPE, -B BOOLEANTYPE
specify searching option for booleans, ie. substring, notsubstring, exact, ... [Default: substring]
--boolean_query=BOOLEAN_QUERY
Create your own query. Format: BooleanName-Condition-Parameter &/| ... . ie, keywords-substring-Partner & keywords-notsubstring-OtherQA
--blocked=BLOCKED
Search for bugs that block this bug ID
--dependson=DEPENDSON
Search for bugs that depend on this bug ID
--flag=FLAG
Search for bugs that have certain flag states present. Ex --flags=dev_ack+
--qa_whiteboard=QA_WHITEBOARD
search for bugs that have certain QA Whiteboard text present
--devel_whiteboard=DEVEL_WHITEBOARD
search for bugs that have certain Devel Whiteboard text present
--alias=ALIAS
search for bugs that have the provided alias
--fixed_in=FIXED_IN
search Status Whiteboard field for specified words

OUTPUT FORMAT 'QUERY' OPTIONS

--full, -f
output detailed bug info
--ids, -i
output only bug IDs
--extra, -e
output additional bug information (keywords, Whiteboards, etc.)
--oneline
one line summary of the bug (useful for scripts)
--raw
raw output of the bugzilla contents
--outputformat=OUTPUTFORMAT
Print output in the form given. You can use RPM-style tags that match bug fields, e.g.: '%{id}: %{summary}'. See the man page section 'OUTPUT FORMAT' for more details.

'MODIFY' OPTIONS

--field=FIELD=VALUE
Modify a specified field. FIELD is expected to be the raw name used by the bugzilla instance. No safety checks are perfomed when using this option.

BUG DETAILS

--product=PRODUCT
Reassign bug to different product
--component=COMPONENT, -c COMPONENT
Reassign bug to different component
--sub-component=SUB_COMPONENT
Reassign bug to different sub-component (rhbz extension)
--version=VERSION, -v VERSION
Reassign bug to different version
--os=OS, -o OS
Change operating system this bug occurs on
--arch=ARCH, -a ARCH
Change arch this bug occurs on
--url=URL, -u URL
URL for further bug info
--alias=ALIAS
An alias (name) for the bug (must be unique)

BUG STATUS 'MODIFY' OPTIONS

--status=STATUS, -s STATUS
Change status of bug
--close=RESOLUTION, -k RESOLUTION
Close with the given resolution
--dupeid=ORIGINAL, -d ORIGINAL
ID of original bug (implies -k DUPLICATE)
--fixed_in=VERSION, -F VERSION
"Fixed in version" field

COMMENT 'MODIFY' OPTIONS

--comment=COMMENT, -l COMMENT
Add a comment
--private, -p
Mark new comment as private
--summary=SUMMARY
Change bug summary

CONTACT 'MODIFY' OPTIONS

--assignee=ASSIGNEE
Assign bugzilla to assignee
--cc=EMAIL
Alter CC list. EMAIL appends, -EMAIL removes.
--qa_contact=QA_CONTACT
Change QA contact
--reset-assignee
Reset assignee to component default
--reset-qa-contact
Reset QA contact to component default
--groups=GROUP[, GROUP, ...]
add groups to which bug is visible

TRACKING 'MODIFY' OPTIONS

--flag=FLAG, -f FLAG
Update bugzilla flags with requested type, ie fedora-cvs?, or needinfoX to clear (Use a new option for each flag)
--severity=SEVERITY
Change bug severity
--priority=PRIORITY
Change bug priority
--target_milestone=TARGET_MILESTONE
Set target milestone
--target_release=TARGET_RELEASE
Set target release
--blocked=BUGID[, BUGID, ...]
Add bug_ids blocked by this bug. BUGID appends, -BUGID removes, =BUGID overwrites
--dependson=BUGID[, BUGID, ...]
Alter depends_on list. BUGID appends, -BUGID removes, =BUGID overwrites
--keywords=KEYWORD
Alter bug keywords list. KEYWORD appends, -KEYWORD removes, =KEYWORD overwrites
--whiteboard=TEXT
Alter status whiteboard text. TEXT appends, -TEXT removes, =TEXT overwrites
--devel_whiteboard=TEXT
Alter devel whiteboard text. TEXT appends, -TEXT removes, =TEXT overwrites
--internal_whiteboard=TEXT
Alter internal whiteboard text. TEXT appends, -TEXT removes, =TEXT overwrites
--qa_whiteboard=TEXT
Alter QA whiteboard. TEXT appends, -TEXT removes, =TEXT overwrites
--tags=TEXT
Alter bug 'tags' fieldTEXT appends, -TEXT removes

'ATTACH' OPTIONS

--file=FILENAME, -f FILENAME
File to attach, or filename for data provided on stdin
--description=DESCRIPTION, -d DESCRIPTION
A short description of the file being attached
--type=MIMETYPE, -t MIMETYPE
Mime-type for the file being attached
--get=ATTACHID, -g ATTACHID
Download the attachment with the given ID
--getall=BUGID, --get-all=BUGID
Download all attachments on the given bug

'INFO' OPTIONS

--products, -p
Get a list of products
--components=PRODUCT, -c PRODUCT
List the components in the given product
--component_owners=PRODUCT, -o PRODUCT
List components (and their owners)
--versions=VERSION, -v VERSION
List the versions for the given product

OUTPUT FORMAT

The output of the bugzilla tool should NEVER BE PARSED unless you are using a custom --outputformat. For everything else, just don't parse it, the formats are not stable and are subject to change.

--outputformat allows printing arbitrary bug data in a user preferred format. For example, to print a returned bug ID, component, and product, separated with ::, do:

--outputformat "%{id}::%{component}::%{product}"

The fields (like 'id', 'component', etc.) are the names of the values returned by bugzilla's XMLRPC interface. To see a list of all fields, check the API documentation in the 'SEE ALSO' section. Alternatively, run a 'bugzilla --debug query ...' and look at the key names returned in the query results. Also, in most cases, using the name of the associated command line switch should work, like --bug_status becomes %{bug_status}, etc.

AUTHENTICATION COOKIES AND TOKENS

Older bugzilla instances use cookie-based authentication, and bugzilla.redhat.com uses a non-cookie token system.

When you log into bugzilla with the "login" subcommand or the "--login" argument, we cache the cookie in ~/.bugzillacookies. If you are using bugzilla.redhat.com, we also cache the token in ~/.bugzillatoken.

To perform an authenticated bugzilla command on a new machine, run a one time "bugzilla login" to cache credentials before running the desired command. You can also run "bugzilla --login" and the login process will be initiated before invoking the command.

Additionally, the --no-cache-credentials option will tell the bugzilla tool to _not_ save any credentials to ~/.bugzillacookies or ~/.bugzillatoken.

EXAMPLES

bugzilla query --bug_id 62037

bugzilla query --version 15 --component python-bugzilla

# All boolean options can be formatted like this
bugzilla query --blocked "123456 | 224466"

bugzilla login

bugzilla new -p Fedora -v rawhide -c python-bugzilla \
         --summary "python-bugzilla causes headaches" \
         --comment "python-bugzilla made my brain hurt when I used it."

bugzilla attach --file ~/Pictures/cam1.jpg --desc "me, in pain" $BUGID

bugzilla attach --getall $BUGID

bugzilla modify --close NOTABUG --comment "Actually, you're hungover." $BUGID

EXIT STATUS

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

BUGS

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