Create Issue
Create a new Jira issue.
For more information on the API for creating an Issue, see Create issue (opens in a new tab).
SDK Import:
from admyral.actions import create_jira_issue
Arguments:
Argument Name | Description | Required |
---|---|---|
Summary summary | Summary of the issue | Yes |
Project ID project_id | The 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_type | The name of the issue type to create (e.g. "Story", "Bug"). | Yes |
Description description | Description of the issue in Atlassian Document Format (opens in a new tab) | - |
Assignee assignee | The 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 labels | List of labels. Note that a label must not contain spaces. | - |
Priority priority | The priority of the issue (e.g., High , Medium ) | - |
Custom Fields custom_fields | Custom 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 Placeholder | Description |
---|---|
JIRA_SECRET | Jira 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"
}