Jira module — Atlassian Python API 3.14.0 documentation
Jira module — Atlassian Python API 3.14.0 documentation
0 documentation
Jira module
Get issues from jql search result with all related fields
jql_request = 'project = DEMO AND status NOT IN (Closed, Resolved) ORDER BY issuekey'
issues = jira.jql(jql_request)
print(issues)
Reindex Jira
# Reindexing Jira
jira.reindex()
# Reindex status
jira.reindex_status()
# Reindex type
jira.reindex_with_type(indexing_type="BACKGROUND_PREFERRED")
"""
FOREGROUND - runs a lock/full reindexing
BACKGROUND - runs a background reindexing.
If JIRA fails to finish the background reindexing, respond with 409 Conflict (error
BACKGROUND_PREFERRED - If possible do a background reindexing.
If it's not possible (due to an inconsistent index), do a foreground rein
"""
Manage users
# Get user
jira.user(account_id)
# Remove user
jira.user_remove(username)
Manage groups
# Create a group
jira.create_group(name)
# Delete a group
# If you delete a group and content is restricted to that group, the content will be hidden from
# To prevent this, use this parameter to specify a different group to transfer the restrictions
# (comments and worklogs only) to v: latest
jira.remove_group(name, swap_group=None)
https://atlassian-python-api.readthedocs.io/jira.html 1/6
6/26/22, 11:06 PM Jira module — Atlassian Python API 3.14.0 documentation
# Get all users from group
jira.get_all_users_from_group(group, include_inactive_users=False, start=0, limit=50)
Manage projects
# Get all projects
# Returns all projects which are visible for the currently logged in user.
jira.projects(included_archived=None)
# Get project
jira.project(key)
# Returns all versions for the specified project. Results are paginated.
# Results can be ordered by the following fields: sequence, name, startDate, releaseDate.
# Results can be filtered by the following fields: query, status.
jira.get_project_versions_paginated(key, start=None, limit=None, order_by=None, expand=None, quer
# Update a project
jira.update_project(project_key, data, expand='lead,description')
https://atlassian-python-api.readthedocs.io/jira.html 2/6
6/26/22, 11:06 PM Jira module — Atlassian Python API 3.14.0 documentation
# Get the issue security scheme for project.
# Returned if the user has the administrator permission or if the scheme is used in a project in
# user has the administrative permission.
# Use only_levels=True for get the only levels entries
jira.get_project_issue_security_scheme(project_id_or_key, only_levels=False)
Manage issues
# Get issue by key
jira.issue(key)
# Update issue
jira.issue_update(issue_key, fields)
# Create issue
jira.issue_create(fields)
# Transition issue
jira.issue_transition(issue_key, status)
https://atlassian-python-api.readthedocs.io/jira.html 3/6
6/26/22, 11:06 PM Jira module — Atlassian Python API 3.14.0 documentation
jira.set_issue_status_by_transition_id(issue_key, transition_id)
Manage Boards
# Create sprint
jira.jira.create_sprint(sprint_name, origin_board_id, start_datetime, end_datetime, goal)
# Rename sprint
jira.rename_sprint(sprint_id, name, start_date, end_date)
Attachments actions
# Add attachment to issue
jira.add_attachment(issue_key, filename)
Manage components
v: latest
# Get component
jira.component(component_id)
https://atlassian-python-api.readthedocs.io/jira.html 4/6
6/26/22, 11:06 PM Jira module — Atlassian Python API 3.14.0 documentation
# Create component
jira.create_component(component)
# Delete component
jira.delete_component(component_id)
TEMPO
# Find existing worklogs with the search parameters.
# Look at the tempo docs for additional information: v: latest
# https://www.tempo.io/server-api-documentation/timesheets#operation/searchWorklogs
# NOTE: check if you are using correct types for the parameters!
https://atlassian-python-api.readthedocs.io/jira.html 5/6
6/26/22, 11:06 PM Jira module — Atlassian Python API 3.14.0 documentation
# :param from: string From Date
# :param to: string To Date
# :param worker: Array of strings
# :param taskId: Array of integers
# :param taskKey: Array of strings
# :param projectId: Array of integers
# :param projectKey: Array of strings
# :param teamId: Array of integers
# :param roleId: Array of integers
# :param accountId: Array of integers
# :param accountKey: Array of strings
# :param filterId: Array of integers
# :param customerId: Array of integers
# :param categoryId: Array of integers
# :param categoryTypeId: Array of integers
# :param epicKey: Array of strings
# :param updatedFrom: string
# :param includeSubtasks: boolean
# :param pageNo: integer
# :param maxResults: integer
# :param offset: integer
jira.tempo_4_timesheets_find_worklogs(**params)
# :PRIVATE:
# Get Tempo timesheet worklog by issue key or id.
jira.tempo_timesheets_get_worklogs_by_issue(issue)
Community Ad
v: latest
https://atlassian-python-api.readthedocs.io/jira.html 6/6