Expression | Type | Parameters | Example Output |
---|
Code Block |
---|
| issue.is_subtask |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.has_parent |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.has_attachments |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.has_comments |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.has_links |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.last_comment |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.has_subtasks |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.is_resolved |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.is_overdue |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | True or False |
Code Block |
---|
| issue.linked_issues |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | [<Issue Object>, <Issue Object> … N] (list[Issue]) if issue has linked issues, if not - returns an empty list [] |
Code Block |
---|
| issue.parent_summary |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | "Find Replicants” |
Code Block |
---|
| # Get the parent from any level in the hierarchy if available
issue.parent
issue.parent.parent
issue.parent.parent.parent
....
issue.parent.parent.parent.parent.parent.parent (lol) |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | <Issue Object> |
Code Block |
---|
| # Get the child issues if any
issue.child |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | [<Issue Object>, <Issue Object> … N] (list[Issue]) if issue has child issues, if not - returns an empty list [] |
Code Block |
---|
| # Get the siblings (same parent issue)
issue.siblings |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | [<Issue Object>, <Issue Object> … N] (list[Issue]) if issue has siblings issues, if not - returns a list with the trigger issue inside. |
Code Block |
---|
| # Get the parent status
issue.parent_status |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | "Done", "In Progress”, “To Do" |
Code Block |
---|
| # Get common data
issue.summary
issue.description
issue.status
issue.reporter
issue.assignee
issue.resolution
issue.priority |
| Status |
---|
colour | Yellow |
---|
title | properties |
---|
|
| | |
Code Block |
---|
| # Get the issue changelog
issue.changelog |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | [<Dict of changelog items>, … ]
Example of one changelog item: Expand |
---|
title | Expand to see example output |
---|
| Code Block |
---|
| {
"id": "12210",
"author": {
"self": "https://[REDACTED]/rest/api/2/user?accountId=[REDACTED]",
"accountId": "[REDACTED]",
"emailAddress": "[REDACTED]",
"avatarUrls": {...},
"displayName": "[REDACTED]",
"active": true,
"timeZone": "America/Sao_Paulo",
"accountType": "atlassian"
},
"created": "2024-05-02T10:36:40.404-0300",
"items": [
{
"field": "Attachment",
"fieldtype": "jira",
"fieldId": "attachment",
"from": null,
"fromString": null,
"to": "10023",
"toString": "backup.zip"
}
]
} |
|
|
Code Block |
---|
| # Get the issue comments
issue.comments |
| Status |
---|
colour | Yellow |
---|
title | property |
---|
|
| | [<Dict of comment items>, … ] Example of one comment object Expand |
---|
title | Expand to see example output |
---|
| Code Block |
---|
| [
{
"self": "https://[REDACTED]/rest/api/2/issue/10335/comment/10041",
"id": "10041",
"author": {
"self": "https://[REDACTED]/rest/api/2/user?accountId=[REDACTED]",
"accountId": "[REDACTED]",
"emailAddress": "[REDACTED]",
"avatarUrls": {...},
"displayName": "[REDACTED]",
"active": true,
"timeZone": "America/Sao_Paulo",
"accountType": "atlassian"
},
"body": "comment body here",
"updateAuthor": {
"self": "https://[REDACTED]/rest/api/2/user?accountId=[REDACTED]",
"accountId": "[REDACTED]",
"emailAddress": "[REDACTED]",
"avatarUrls": {...},
"displayName": "[REDACTED]",
"active": true,
"timeZone": "America/Sao_Paulo",
"accountType": "atlassian"
},
"created": "2024-06-26T17:25:30.508-0300",
"updated": "2024-06-26T17:25:30.508-0300",
"jsdPublic": true
}
] |
|
|
Code Block |
---|
| # Copies information from another issue
issue.copy_field_from(source_issue_key: str, fieldKey: str) |
| | source_issue_key (str)
fieldKey (str)
| Copies the value of another issue if this issue exists |
Code Block |
---|
| # Copies data from one field to another (same issue)
issue.copy_field_value(source_field: str, target_field: str) |
| | source_field (str)
target_field (str)
| Copies the value from a field to another in the same issue |
Code Block |
---|
| # Assign an issue
issue.assign_to(issue.fields.reporter)
# OR
issue.assign_to(issue.fields.reporter.accountId) # Accepts both |
| | user.accountId (str)
user (dict)
| Assigns an issue if user has assignable user permission |
Code Block |
---|
| # Set the value of a field (performance approach)
issue.set('field', 'value')
issue.set('labels', ['label1', 'label2'])
issue.set('summary', 'new summary')
issue.set('customfield_10000', 'my info') |
Info |
---|
Information on the “Value" should match expected data by the field type. |
| | field (str)
value (any)
|
|
Code Block |
---|
| issue.set_due_date(due_date) # Expects YYYY-MM-DD eg.: 2021-04-21 |
| | | |
Code Block |
---|
| # Links an Issue to another
issue.link_to("ISSUE-456", "Relates to") |
| | related_issue (str)
link type name (str)
| |
Code Block |
---|
| # Transition one issue AND (optionally) update fields
issue.transition("in progress", customfield_10000="ABC") |
| | target_status_name (str)
**kwargs(any)
| |
Code Block |
---|
| # Add a comment (internal or external)
issue.add_comment(message, internal=False) |
| | message (str)
internal (bool)
| |
Code Block |
---|
| # Set a custom property for the issue
issue.set_property(key="custom_key", value="custom_value") |
| | key (str)
value (any)
| |
Code Block |
---|
| # Get a custom property for the issue
issue.get_property(key="custom_key") |
| | key (str)
| Value set previously on issue.set_property |
Code Block |
---|
| # Calculate the time the issue spent in each status
issue.time_in_status() |
| | | status and seconds the issue spent in that status {“Done": 120304, “In Progress": 20012} |
Code Block |
---|
| # Handle Labels
issue.add_label("your-label")
issue.remove_label("your-label") |
| | label (str)
| |
Code Block |
---|
| # Issue Notification
issue.notify(
subject,
html, text,
users=[],
assignee=True,
reporter=False,
voters=False,
watchers=False
) |
Info |
---|
Users must be a list of accountIds ["accountId1", "accountId2"... etc] |
| | subject (str)
html (str)
text (str)
users (list[str])
assignee (bool)
reporter (bool)
voters (bool)
watchers (bool)
| |
Code Block |
---|
| issue.delete() # permanently deletes the issue |
| | | |