include::include/header.adoc[]

== Name

bite-bugzilla-create - create bug

== Synopsis

*bite bugzilla <create|c>* <options>::
    Create bug.

*bite bugzilla <create|c>* [-h|--help]::
    Output help information.

== Description

Create bug.

include::include/global-options.adoc[]

== Create options

*--from-bug* <id>::
    Read attributes from an existing bug.
+
Value must be the ID of an existing bug which will be used to pre-populate the
relevant, required fields for creation.
+
Combining this option with -n/--dry-run and --to allows creating templates
using existing bugs to edit and use later without creating a new bug.
+
.Create template using existing bug:
 bite bugzilla create --from-bug 123 --to template1 --dry-run

include::include/template-options.adoc[]

.Create bug using template:
 bite bugzilla create --from template1 -S summary -D description

.Create template using specified values:
 bite bugzilla create -p TestProduct -C TestComponent --to template1 --dry-run

== Attribute options

*-A, --alias* <value[,...]>::
    Set aliases.
+
The values must be unique aliases for a bug, using existing aliases will cause
the service to return an error.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.
+
.Create bug with multiple aliases:
 bite bugzilla create --alias alias1,alias2

*-a, --assignee* <user>::
    Assign a bug to a user.
+
The value must be an email address for a service user. The alias `@me` can be
used for the service's configured user if one exists.
+
.Create bug assigned to yourself:
 bite bugzilla create --assignee @me

*-b, --blocks* <id[,...]>::
    Set blockers.
+
Values must be valid IDs for existing bugs.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.
+
Values are taken from standard input when `-`.
+
.Create bug with blockers using specified keywords:
 bite bugzilla search -k kw1,kw2 -f id | bite bugzilla create --blocks -

*--cc* <user[,...]>::
    Set users in the CC list.
+
Values must be email addresses for service users.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.
+
.Create bug CCing specified users:
 bite bugzilla create --cc user1@email.com --cc user2@email.com

*-C, --component* <value>::
    Set the component.

*--cf* <name> <value>::
    Set custom fields.
+
Custom field names must match the raw values used by bugzilla itself in the form of
`cf_custom_field_name`.
+
Multiple arguments can be specified via multiple options.
+
.Create bug with custom field:
 bite bugzilla create --cf cf_stabilisation_atoms '=cat/pkg-1'

*-d, --depends* <id[,...]>::
    Set dependencies.
+
Values must be valid IDs for existing bugs.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.
+
Values are taken from standard input when `-`.
+
.Create bug that depends on bugs 11 and 12:
 bite bugzilla create --depends 11,12
 bite bugzilla create -d 11 -d 12

*-D, --description* <value>::
    Set the description.

*-F, --flags* <value[,...]>::
    Set flags.
+
Values must be valid flags composed of the flag name followed by its status.
Supported statuses include `+`, `-`, and `?`.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.
+
.Create bug with flags:
 bite bugzilla create --flags flag1+,flag2-
 bite bugzilla create -F flag1+ -F flag2-

*-g, --groups* <value[,...]>::
    Set groups.
+
Values must be valid service groups. No arguments may be used to avoid adding
the bug to all default groups for the targeted product.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.

*-k, --keywords* <value[,...]>::
    Set keywords.
+
Values must be valid keywords.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.

*--os* <value>::
    Set operating system.

*--platform* <value>::
    Set platform.

*--priority* <value>::
    Set priority.

*-p, --product* <value>::
    Set product.

*--qa* <user>::
    Set the QA contact.
+
The value must be an email address for a service user. The alias `@me` can also
be used for the service's configured user if one exists.

*-r, --resolution* <value>::
    Set resolution.

*-U, --see-also* <value[,...]>::
    Set URLs to bugs in external trackers.
+
Values must be valid URLs to bugs, issues, or tickets in external trackers.
+
Multiple arguments can be specified in a comma-separated list or via multiple
options.

*--severity* <value>::
    Set severity.

*-s, --status* <value>::
    Set status.

*-S, --summary* <value>::
    Set summary.

*-T, --target* <value>::
    Set target milestone.

*-u, --url* <value>::
    Set URL.

*-V, --version* <value>::
    Set version.

*-w, --whiteboard* <value>::
    Set whiteboard.

== See Also

linkcmd:bite-bugzilla[1]
