Integrations
Jira
APIs
Create Issue

Create Issue

Create a new Jira issue.

For Jira's documentation, see Create Issue (opens in a new tab).

SDK Import:

from admyral.actions import create_jira_issue

Arguments:

Argument NameDescriptionRequired
Summary summarySummary of the issueYes
Project ID project_idThe ID of the project to create the issue in. See here (opens in a new tab) for finding the project ID using the Jira UI.Yes
Issue Type issue_typeThe name of the issue type to create (e.g. "Story", "Bug").Yes
Description descriptionDescription of the issue in Atlassian Document Format (opens in a new tab)-
Assignee assigneeThe account ID of the assignee. You can obtain the ID in the UI (see here (opens in a new tab)) or use the Find users API.-
Labels labelsList of labels. Note that a label must not contain spaces.-
Priority priorityThe priority of the issue (e.g., High, Medium)-
Custom Fields custom_fieldsCustom fields for the issue (e.g., { "customfield_10000": "value" }) defined as a JSON object. Note that you must use the IDs of the custom fields. See here (opens in a new tab) for finding the ID of a custom field.-

Returns

A JSON object.

Required Secrets

Secret PlaceholderDescription
JIRA_SECRETJira secret. See Jira setup

SDK Example

result = create_jira_issue(
	summary="Case: New case",
	project_id="10001",
	issue_type="Bug",
	description={
		"content": [
			{
				"content": [
					{
						"text": "Order entry fails when selecting supplier.",
						"type": "text",
					}
				],
				"type": "paragraph",
			}
		],
		"type": "doc",
		"version": 1,
	},
	assignee="712020:8f417ffa-dc11-42b9-8464-b9e8b7a31559",
	labels=["case", "new"],
	priority="Medium",
	secrets={"JIRA_SECRET": "jira_secret"},
)

Example Output:

{
	"id": "10016",
	"key": "SJ-15",
	"self": "https://christesting123.atlassian.net/rest/api/3/issue/10016"
}