sym.sdk.integrations.jira.create_issue¶
- sym.sdk.integrations.jira.create_issue(title: str, project_key: str, issue_type_name: str, description: Optional[str] = None, due_date: Optional[str] = None, labels: Optional[List[str]] = None, parent_issue_id_or_key: Optional[str] = None, priority_id: Optional[str] = None, custom_fields: Optional[Dict[str, Any]] = None) str ¶
Creates a Jira issue.
- To create a subtask issue:
issue_type_name
must be set to the name of an issue type lower in hierarchy than the issue type of the parent issue.parent_issue_id_or_key
must contain the ID or key of the parent issue.
See Jira’s API docs for details.
- Parameters
title – The title of the Jira issue.
project_key – The key of the project to which the Jira issue should belong.
issue_type_name – The name of the issue type to assign the Jira issue (e.g. “Bug”).
description – An optional description of the Jira issue.
due_date – An optional due date of the Jira issue, in the YYYY-MM-DD format.
labels – An optional list of labels to attach to the Jira issue.
parent_issue_id_or_key – An optional ID or key of the parent issue.
priority_id – An optional priority ID for the Jira issue.
custom_fields –
An optional dictionary of custom field names to custom field values.
Notes
Custom fields must be added to the screen of the specified issue type. Read more.
Anything passed to
custom_fields
will be passed as-is to the request body of the API call. Therefore, it is important to convert your custom field values to the appropriate format (e.g. multi-line text custom fields only take the Atlassian Document Format content). Please refer to the Jira docs to convert your custom field values to the Jira-accepted format.
- Returns
The key of the Jira issue.
- Raises
JiraError – If the project, issue type, parent issue or priority does not exist, or if the due date is invalid.