You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 Jirajira.reindex()
# Reindex statusjira.reindex_status()
# Reindex typejira.reindex_with_type(indexing_type="BACKGROUND_PREFERRED")
"""FOREGROUND - runs a lock/full reindexingBACKGROUND - runs a background reindexing. If JIRA fails to finish the background reindexing, respond with 409 Conflict (error message).BACKGROUND_PREFERRED - If possible do a background reindexing. If it's not possible (due to an inconsistent index), do a foreground reindexing."""
Manage users
# Get userjira.user(username)
# Remove userjira.user_remove(username)
# Deactivate user. Works from 8.3.0 releasejira.user_deactivate(username)
# Get web sudo cookies using normal http requestjira.user_get_websudo()
# Fuzzy search using username and display namejira.user_find_by_user_string(username, start=0, limit=50, include_inactive_users=False)
Manage groups
# Create a groupjira.create_group(name)
# Delete a group# If you delete a group and content is restricted to that group, the content will be hidden from all users# To prevent this, use this parameter to specify a different group to transfer the restrictions# (comments and worklogs only) tojira.remove_group(name, swap_group=None)
# Get all users from groupjira.get_all_users_from_group(group, include_inactive_users=False, start=0, limit=50)
# Add given user to a groupjira.add_user_to_group(username, group_name)
# Remove given user from a groupjira.remove_user_from_group(username, group_name)
Manage projects
# Get all projects# Returns all projects which are visible for the currently logged in user.jira.projects(included_archived=None)
# Get all project alternative call# Returns all projects which are visible for the currently logged in user.jira.get_all_projects(included_archived=None)
# Get projectjira.project(key)
# Get project components using project keyjira.get_project_components(key)
# Get a full representation of a the specified project's versionsjira.get_project_versions(key, expand=None)
# Returns all versions for the specified project. Results are paginated.# Results can be ordered by the following fields: sequence, name, startDate, releaseDate.jira.get_project_versions_paginated(key, start=None, limit=None, order_by=None, expand=None)
# Add missing version to projectjira.add_version(key, project_id, version, is_archived=False, is_released=False)
# Get project leadersjira.project_leaders()
# Get last project issuekeyjira.get_project_issuekey_last(project)
# Get all project issue keysjira.get_project_issuekey_all(project)
# Get project issues countjira.get_project_issues_count(project)
# Get all project issuesjira.get_all_project_issues(project, fields='*all')
# Get all assignable users for projectjira.get_all_assignable_users_for_project(project_key, start=0, limit=50)
# Update a projectjira.update_project(project_key, data, expand='lead,description')
# Get project permission scheme# Use 'expand' to get details (default is None)jira.get_project_permission_scheme(project_id_or_key, expand='permissions,user,group,projectRole,field,all')
# 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 which the# user has the administrative permission.# Use only_levels=True for get the only levels entriesjira.get_project_issue_security_scheme(project_id_or_key, only_levels=False)
Manage issues
# Get issue by keyjira.issue(key)
# Get issue field valuejira.issue_field_value(key, field)
# Update issue fieldfields= {'summary': 'New summary'}
jira.update_issue_field(key, fields)
# Get existing custom fields or find by filterget_custom_fields(self, search=None, start=1, limit=50):
# Rename sprintjira.rename_sprint(sprint_id, name, start_date, end_date)
# Check issue existsjira.issue_exists(issue_key)
# Check issue deletedjira.issue_deleted(issue_key)
# Update issuejira.issue_update(issue_key, fields)
# Create issuejira.issue_create(fields)
# Issue create or updatejira.issue_create_or_update(fields)
# Get issue transitionsjira.get_issue_transitions(issue_key)
# Get status ID from namejira.get_status_id_from_name(status_name)
# Get transition id to status namejira.get_transition_id_to_status_name(issue_key, status_name)
# Transition issuejira.issue_transition(issue_key, status)
# Set issue statusjira.set_issue_status(issue_key, status_name, fields=None)
# Set issue status by transition_idjira.set_issue_status_by_transition_id(issue_key, transition_id)
# Get issue statusjira.get_issue_status(issue_key)
# Create or Update Issue Linksjira.create_or_update_issue_remote_links(issue_key, link_url, title, global_id=None, relationship=None)
# Get Issue Link by link IDjira.get_issue_remote_link_by_id(issue_key, link_id)
# Update Issue Link by link IDjira.update_issue_remote_link_by_id(issue_key, link_id, url, title, global_id=None, relationship=None)
# Delete Issue Linksjira.delete_issue_remote_link_by_id(issue_key, link_id)
Attachments actions
# Add attachment to issuejira.add_attachment(issue_key, filename)
Manage components
# Get componentjira.component(component_id)
# Create componentjira.create_component(component)
# Delete componentjira.delete_component(component_id)
Upload Jira plugin
upload_plugin(plugin_path)
Issue link types
# Get Issue link typesjira.get_issue_link_types():
# Create Issue link typesjira.create_issue_link_type(data):
"""Create a new issue link type. :param data: { "name": "Duplicate", "inward": "Duplicated by", "outward": "Duplicates" }"""# Get issue link type by idjira.get_issue_link_type(issue_link_type_id):
# Delete issue link typejira.delete_issue_link_type(issue_link_type_id):
# Update issue link typejira.update_issue_link_type(issue_link_type_id, data):
Issue security schemes
# Get all security schemes.# Returned if the user has the administrator permission or if the scheme is used in a project in which the# user has the administrative permission.jira.get_issue_security_schemes()
# Get issue security scheme.# Returned if the user has the administrator permission or if the scheme is used in a project in which the# user has the administrative permission.# Use only_levels=True for get the only levels entriesjira.get_issue_security_scheme(scheme_id, only_levels=False)
TEMPO
# Find existing worklogs with the search parameters.# Look at the tempo docs for additional information:# https://www.tempo.io/server-api-documentation/timesheets#operation/searchWorklogs# NOTE: check if you are using correct types for the parameters!# :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: integerjira.tempo_4_timesheets_find_worklogs(**params)
# :PRIVATE:# Get Tempo timesheet worklog by issue key or id.jira.tempo_timesheets_get_worklogs_by_issue(issue)