class documentation

User interface to Jira. Clients interact with Jira by constructing an instance of this object and calling its methods. For addressable resources in Jira -- those with "self" links -- an appropriate subclass of :py:class:`jira.resources.Resource` will be returned with customized ``update()`` and ``delete()`` methods, along with attribute access to fields. This means that calls of the form ``issue.fields.summary`` will be resolved into the proper lookups to return the JSON value at that mapping. Methods that do not return resources will return a dict constructed from the JSON response or a scalar value; see each method's documentation for details on what that method returns. Without any arguments, this client will connect anonymously to the Jira instance started by the Atlassian Plugin SDK from one of the 'atlas-run', ``atlas-debug`` or ``atlas-run-standalone`` commands. By default, this instance runs at ``http://localhost:2990/jira``. The ``options`` argument can be used to set the Jira instance to use. Authentication is handled with the ``basic_auth`` argument. If authentication is supplied (and is accepted by Jira), the client will remember it for subsequent requests. For quick command line access to a server, see the ``jirashell`` script included with this distribution. The easiest way to instantiate is using ``j = JIRA("https://jira.atlassian.com")``

Method __del__ Destructor for JIRA instance.
Method __init__ Construct a Jira client instance.
Method add_attachment Attach an attachment to an issue and returns a Resource for it.
Method add_comment Add a comment from the current authenticated user on the specified issue and return a Resource for it.
Method add_group Create a new group in Jira.
Method add_issue_property Add or update a specific issue property Resource.
Method add_issues_to_epic Add the issues in ``issue_keys`` to the ``epic_id``.
Method add_issues_to_sprint Add the issues in ``issue_keys`` to the ``sprint_id``.
Method add_remote_link Add a remote link from an issue to an external application and returns a remote link Resource for it.
Method add_simple_link Add a simple remote link from an issue to web resource.
Method add_user Create a new Jira user.
Method add_user_to_group Add a user to an existing group.
Method add_vote Register a vote for the current authenticated user on an issue.
Method add_watcher Add a user to an issue's watchers list.
Method add_worklog Add a new worklog entry on an issue and return a Resource for it.
Method application_properties Return the mutable server application properties.
Method applicationlinks List of application links.
Method assign_issue Assign an issue to a user.
Method async_do Execute all asynchronous jobs and wait for them to finish. By default it will run on 10 threads.
Method attachment Get an attachment Resource from the server for the specified ID.
Method attachment_meta Get the attachment metadata.
Method avatars Undocumented
Method backup Will call jira export to backup as zipped xml. Returning with success does not mean that the backup process finished.
Method backup_complete Return boolean based on 'alternativePercentage' and 'size' returned from backup_progress (cloud only).
Method backup_download Download backup file from WebDAV (cloud only).
Method backup_progress Return status of cloud backup as a dict.
Method boards Get a list of board resources.
Method client_info Get the server this client is connected to.
Method close Undocumented
Method comment Get a comment Resource from the server for the specified ID.
Method comments Get a list of comment Resources of the issue provided.
Method component Get a component Resource from the server.
Method component_count_related_issues Get the count of related issues for a component.
Method confirm_project_avatar Confirm the temporary avatar image previously uploaded with the specified cropping.
Method confirm_user_avatar Confirm the temporary avatar image previously uploaded with the specified cropping.
Method create_board Create a new board for the ``project_ids``.
Method create_component Create a component inside a project and return a Resource for it.
Method create_customer Create a new customer and return an issue Resource for it.
Method create_customer_request Create a new customer request and return an issue Resource for it.
Method create_filter Create a new filter and return a filter Resource for it.
Method create_issue Create a new issue and return an issue Resource for it.
Method create_issue_link Create a link between two issues.
Method create_issues Bulk create new issues and return an issue Resource for each successfully created issue.
Method create_project Create a project with the specified parameters.
Method create_sprint Create a new sprint for the ``board_id``.
Method create_temp_project_avatar Register an image file as a project avatar.
Method create_temp_user_avatar Register an image file as a user avatar.
Method create_version Create a version in a project and return a Resource for it.
Method createmeta Get the metadata required to create issues, optionally filtered by projects and issue types.
Method createmeta_fieldtypes Get the field metadata for a given project and issue type, required to create issues.
Method createmeta_issuetypes Get the issue types metadata for a given project, required to create issues.
Method current_user Return the `accountId` (Cloud) else `username` of the current user.
Method custom_field_option Get a custom field option Resource from the server.
Method dashboard Get a dashboard Resource from the server.
Method dashboards Return a ResultList of Dashboard resources and a ``total`` count.
Method deactivate_user Disable/deactivate the user.
Method delete_attachment Delete attachment by id.
Method delete_board Delete an agile board.
Method delete_component Delete component by id.
Method delete_issue_link Delete a link between two issues.
Method delete_permissionscheme Undocumented
Method delete_project Delete project from Jira.
Method delete_project_avatar Delete a project's avatar.
Method delete_remote_link Delete remote link from issue by internalId or globalId.
Method delete_screen Undocumented
Method delete_user Deletes a Jira User.
Method delete_user_avatar Delete a user's avatar.
Method editmeta Get the edit metadata for an issue.
Method favourite_filters Get a list of filter Resources which are the favourites of the currently authenticated user.
Method fields Return a list of all issue fields.
Method filter Get a filter Resource from the server.
Method find Find Resource object for any addressable resource on the server.
Method find_transitionid_by_name Get a transitionid available on the specified issue to the current user.
Method get_igrid Undocumented
Method get_issue_type_scheme_associations For the specified issue type scheme, returns all of the associated projects. (Admin required).
Method get_project_version_by_name Get a version Resource by its name present on a project.
Method group Get a group Resource from the server.
Method group_members Return a hash or users with their information. Requires Jira 6.0 or will raise NotImplemented.
Method groups Return a list of groups matching the specified criteria.
Method incompletedIssuesEstimateSum Return the total incompleted points this sprint.
Method issue Get an issue Resource from the server.
Method issue_link Get an issue link Resource from the server.
Method issue_link_type Get an issue link type Resource from the server.
Method issue_link_types Get a list of issue link type Resources from the server.
Method issue_properties Get a list of issue property Resource from the server for an issue.
Method issue_property Get a specific issue property Resource from the server.
Method issue_type Get an issue type Resource from the server.
Method issue_type_by_name Get issue type by name.
Method issue_type_schemes Get all issue type schemes defined (Admin required).
Method issue_types Get a list of issue type Resources from the server.
Method issue_types_for_project Get a list of issue types available within the project.
Method issuesecurityschemes Undocumented
Method kill_session Destroy the session of the current authenticated user.
Method kill_websudo Destroy the user's current WebSudo session.
Method move_to_backlog Move issues in ``issue_keys`` to the backlog, removing them from all sprints that have not been completed.
Method move_version Move a version within a project's ordered version list and return a new version Resource for it.
Method my_permissions Get a dict of all available permissions on the server.
Method myself Get a dict of server information for this Jira instance.
Method notificationschemes Undocumented
Method permissionschemes Undocumented
Method priorities Get a list of priority Resources from the server.
Method priority Get a priority Resource from the server.
Method project Get a project Resource from the server.
Method project_avatars Get a dict of all avatars for a project visible to the current authenticated user.
Method project_components Get a list of component Resources present on a project.
Method project_issue_security_level_scheme Get a IssueSecurityLevelScheme Resource from the server.
Method project_notification_scheme Get a NotificationScheme Resource from the server.
Method project_permissionscheme Get a PermissionScheme Resource from the server.
Method project_priority_scheme Get a PriorityScheme Resource from the server.
Method project_role Get a role Resource.
Method project_roles Get a dict of role names to resource locations for a project.
Method project_versions Get a list of version Resources present on a project.
Method project_workflow_scheme Get a WorkflowScheme Resource from the server.
Method projectcategories Undocumented
Method projects Get a list of project Resources from the server visible to the current authenticated user.
Method rank Rank an issue before/after another using the default Ranking field, the one named 'Rank'.
Method reindex Start jira re-indexing. Returns True if reindexing is in progress or not needed, or False.
Method remote_link Get a remote link Resource from the server.
Method remote_links Get a list of remote link Resources from an issue.
Method remove_group Delete a group from the Jira instance.
Method remove_user_from_group Remove a user from a group.
Method remove_vote Remove the current authenticated user's vote from an issue.
Method remove_watcher Remove a user from an issue's watch list.
Method removed_issues Return the completed issues for the sprint.
Method removedIssuesEstimateSum Return the total incompleted points this sprint.
Method rename_user Rename a Jira user.
Method rename_version Rename a version Resource on a project.
Method request_type_by_name Undocumented
Method request_types Returns request types supported by a service desk instance.
Method resolution Get a resolution Resource from the server.
Method resolutions Get a list of resolution Resources from the server.
Method role Return Jira role information.
Method screens Undocumented
Method search_allowed_users_for_issue Get a list of user Resources that match a username string and have browse permission for the issue or project.
Method search_assignable_users_for_issues Get a list of user Resources that match the search string for assigning or creating issues.
Method search_assignable_users_for_projects Get a list of user Resources that match the search string and can be assigned issues for projects.
Method search_issues Get a :class:`~jira.client.ResultList` of issue Resources matching a JQL search string.
Method search_users Get a list of user Resources that match the specified search string.
Method security_level Get a security level Resource.
Method server_info Get a dict of server information for this Jira instance.
Method service_desk Get a Service Desk Resource from the server.
Method service_desks Get a list of ServiceDesk Resources from the server visible to the current authenticated user.
Method session Get a dict of the current authenticated user's session information.
Method set_application_property Set the application property.
Method set_project_avatar Set a project's avatar.
Method set_user_avatar Set a user's avatar.
Method sprint Return the information about a sprint.
Method sprint_info Return the information about a sprint.
Method sprints Get a list of sprint Resources.
Method sprints_by_name Get a dictionary of sprint Resources where the name of the sprint is the key.
Method status Get a status Resource from the server.
Method statuscategories Get a list of status category Resources from the server.
Method statuscategory Get a status category Resource from the server.
Method statuses Get a list of all status Resources from the server.
Method supports_service_desk Returns if the Jira instance supports service desk.
Method templates Undocumented
Method transition_issue Perform a transition on an issue.
Method transitions Get a list of the transitions available on the specified issue to the current user.
Method update_filter Update a filter and return a filter Resource for it.
Method update_sprint Updates the sprint with the given values.
Method user Get a user Resource from the server.
Method user_avatars Get a dict of avatars for the specified user.
Method version Get a version Resource.
Method version_count_related_issues Get a dict of the counts of issues fixed and affected by a version.
Method version_count_unresolved_issues Get the number of unresolved issues for a version.
Method votes Get a votes Resource from the server.
Method watchers Get a watchers Resource from the server for an issue.
Method workflows Undocumented
Method workflowscheme Undocumented
Method worklog Get a specific worklog Resource from the server.
Method worklogs Get a list of worklog Resources from the server for an issue.
Constant DEFAULT_OPTIONS Undocumented
Class Variable checked_version Undocumented
Instance Variable auth Undocumented
Instance Variable authCookie Undocumented
Instance Variable deploymentType Undocumented
Instance Variable log Undocumented
Instance Variable sys_version_info Undocumented
Property server_url Return the server url.
Static Method _timestamp Undocumented
Method _add_client_cert_to_session Adds the client certificate to the session.
Method _add_ssl_cert_verif_strategy_to_session Adds verification strategy for host SSL certificates.
Method _check_for_html_error Undocumented
Method _check_update_ Check if the current version of the library is outdated.
Method _create_cookie_auth Undocumented
Method _create_http_basic_session Creates a basic http session.
Method _create_jwt_session Undocumented
Method _create_kerberos_session Undocumented
Method _create_oauth_session Undocumented
Method _create_token_session Creates token-based session.
Method _fetch_pages Fetch from a paginated end point.
Method _find_for_resource Uses the find method of the provided Resource class.
Method _gain_sudo_session Undocumented
Method _get_batch_size Return the batch size for the given resource type from the options.
Method _get_items_from_page Undocumented
Method _get_json Get the json for a given path and params.
Method _get_latest_url Returns the full url based on Jira base url and the path provided.
Method _get_mime_type Get the MIME type for a given stream of bytes.
Method _get_sprint_field_id Undocumented
Method _get_url Returns the full url based on Jira base url and the path provided.
Method _get_user_id Internal method for translating a user search (str) to an id.
Method _get_user_identifier Get the unique identifier depending on the deployment type.
Method _set_avatar Undocumented
Method _try_magic Undocumented
Method _update_fields_cache Update the cache used for `self._fields_cache`.
Instance Variable _applicationlinks Undocumented
Instance Variable _cached_issue_link_types Undocumented
Instance Variable _fields_cache_value Undocumented
Instance Variable _myself Undocumented
Instance Variable _options Undocumented
Instance Variable _rank Undocumented
Instance Variable _session Undocumented
Instance Variable _version Undocumented
Property _fields_cache Cached dictionary of {Field Name: Field ID}. Lazy loaded.
Property _is_cloud Return whether we are on a Cloud based Jira instance.
def __del__(self): (source)

Destructor for JIRA instance.

def __init__(self, server: str = None, options: Dict[str, Union[str, bool, Any]] = None, basic_auth: Optional[Tuple[str, str]] = None, token_auth: Optional[str] = None, oauth: Dict[str, Any] = None, jwt: Dict[str, Any] = None, kerberos=False, kerberos_options: Dict[str, Any] = None, validate=False, get_server_info: bool = True, async_: bool = False, async_workers: int = 5, logging: bool = True, max_retries: int = 3, proxies: Any = None, timeout: Optional[Union[None, float, Tuple[float, float], Tuple[float, None]]] = None, auth: Tuple[str, str] = None, default_batch_sizes: Optional[Dict[Type[Resource], Optional[int]]] = None): (source)

Construct a Jira client instance. Without any arguments, this client will connect anonymously to the Jira instance started by the Atlassian Plugin SDK from one of the 'atlas-run', ``atlas-debug`` or ``atlas-run-standalone`` commands. By default, this instance runs at ``http://localhost:2990/jira``. The ``options`` argument can be used to set the Jira instance to use. Authentication is handled with the ``basic_auth`` or ``token_auth`` argument. If authentication is supplied (and is accepted by Jira), the client will remember it for subsequent requests. For quick command line access to a server, see the ``jirashell`` script included with this distribution. The easiest way to instantiate is using ``j = JIRA("https://jira.atlasian.com")`` Args: server (Optional[str]): The server address and context path to use. Defaults to ``http://localhost:2990/jira``. options (Optional[Dict[str, bool, Any]]): Specify the server and properties this client will use. Use a dict with any of the following properties: * server -- the server address and context path to use. Defaults to ``http://localhost:2990/jira``. * rest_path -- the root REST path to use. Defaults to ``api``, where the Jira REST resources live. * rest_api_version -- the version of the REST resources under rest_path to use. Defaults to ``2``. * agile_rest_path - the REST path to use for Jira Agile requests. Defaults to ``agile``. * verify (Union[bool, str]) -- Verify SSL certs. (Default: ``True``). Or path to a CA_BUNDLE file or directory with certificates of trusted CAs, for the `requests` library to use. * client_cert (Union[str, Tuple[str,str]]) -- Path to file with both cert and key or a tuple of (cert,key), for the `requests` library to use for client side SSL. * check_update -- Check whether using the newest python-jira library version. * headers -- a dict to update the default headers the session uses for all API requests. basic_auth (Optional[Tuple[str, str]]): A tuple of username and password to use when establishing a session via HTTP BASIC authentication. token_auth (Optional[str]): A string containing the token necessary for (PAT) bearer token authorization. oauth (Optional[Any]): A dict of properties for OAuth authentication. The following properties are required: * access_token -- OAuth access token for the user * access_token_secret -- OAuth access token secret to sign with the key * consumer_key -- key of the OAuth application link defined in Jira * key_cert -- private key file to sign requests with (should be the pair of the public key supplied to Jira in the OAuth application link) kerberos (bool): True to enable Kerberos authentication. (Default: ``False``) kerberos_options (Optional[Dict[str,str]]): A dict of properties for Kerberos authentication. The following properties are possible: * mutual_authentication -- string DISABLED or OPTIONAL. Example kerberos_options structure: ``{'mutual_authentication': 'DISABLED'}`` jwt (Optional[Any]): A dict of properties for JWT authentication supported by Atlassian Connect. The following properties are required: * secret -- shared secret as delivered during 'installed' lifecycle event (see https://developer.atlassian.com/static/connect/docs/latest/modules/lifecycle.html for details) * payload -- dict of fields to be inserted in the JWT payload, e.g. 'iss' Example jwt structure: ``{'secret': SHARED_SECRET, 'payload': {'iss': PLUGIN_KEY}}`` validate (bool): True makes your credentials first to be validated. Remember that if you are accessing Jira as anonymous it will fail. (Default: ``False``). get_server_info (bool): True fetches server version info first to determine if some API calls are available. (Default: ``True``). async_ (bool): True enables async requests for those actions where we implemented it, like issue update() or delete(). (Default: ``False``). async_workers (int): Set the number of worker threads for async operations. timeout (Optional[Union[Union[float, int], Tuple[float, float]]]): Set a read/connect timeout for the underlying calls to Jira. Obviously this means that you cannot rely on the return code when this is enabled. max_retries (int): Sets the amount Retries for the HTTP sessions initiated by the client. (Default: ``3``) proxies (Optional[Any]): Sets the proxies for the HTTP session. auth (Optional[Tuple[str,str]]): Set a cookie auth token if this is required. logging (bool): True enables loglevel to info => else critical. (Default: ``True``) default_batch_sizes (Optional[Dict[Type[Resource], Optional[int]]]): Manually specify the batch-sizes for the paginated retrieval of different item types. `Resource` is used as a fallback for every item type not specified. If an item type is mapped to `None` no fallback occurs, instead the JIRA-backend will use its default batch-size. By default all Resources will be queried in batches of 100. E.g., setting this to ``{Issue: 500, Resource: None}`` will make :py:meth:`search_issues` query Issues in batches of 500, while every other item type's batch-size will be controlled by the backend. (Default: None)

@translate_resource_args
def add_attachment(self, issue: Union[str, int], attachment: Union[str, BufferedReader], filename: str = None) -> Attachment: (source)

Attach an attachment to an issue and returns a Resource for it. The client will *not* attempt to open or validate the attachment; it expects a file-like object to be ready for its use. The user is still responsible for tidying up (e.g., closing the file, killing the socket, etc.) Args: issue (Union[str, int]): the issue to attach the attachment to attachment (Union[str,BufferedReader]): file-like object to attach to the issue, also works if it is a string with the filename. filename (str): optional name for the attached file. If omitted, the file object's ``name`` attribute is used. If you acquired the file-like object by any other method than ``open()``, make sure that a name is specified in one way or the other. Returns: Attachment

@translate_resource_args
def add_comment(self, issue: Union[str, int], body: str, visibility: Optional[Dict[str, str]] = None, is_internal: bool = False) -> Comment: (source)

Add a comment from the current authenticated user on the specified issue and return a Resource for it. Args: issue (Union[str, int]): ID or key of the issue to add the comment to body (str): Text of the comment to add visibility (Optional[Dict[str, str]]): a dict containing two entries: "type" and "value". "type" is 'role' (or 'group' if the Jira server has configured comment visibility for groups) "value" is the name of the role (or group) to which viewing of this comment will be restricted. is_internal (bool): True marks the comment as 'Internal' in Jira Service Desk (Default: ``False``) Returns: Comment: the created comment

def add_group(self, groupname: str) -> bool: (source)

Create a new group in Jira. Args: groupname (str): The name of the group you wish to create. Returns: bool: True if successful.

@translate_resource_args
def add_issue_property(self, issue: str, key: str, data) -> Response: (source)

Add or update a specific issue property Resource. Args: issue (str): ID or key of the issue to set the property to key (str): Key of the property to set data: The data to set for the property Returns: Response

def add_issues_to_epic(self, epic_id: str, issue_keys: Union[str, List[str]], ignore_epics: bool = None) -> Response: (source)

Add the issues in ``issue_keys`` to the ``epic_id``. Issues can only exist in one Epic! Args: epic_id (str): The ID for the epic where issues should be added. issue_keys (Union[str, List[str]]): The list (or comma separated str) of issues to add to the epic ignore_epics (bool): Deprecated. Returns: Response

def add_issues_to_sprint(self, sprint_id: int, issue_keys: List[str]) -> Response: (source)

Add the issues in ``issue_keys`` to the ``sprint_id``. The sprint must be started but not completed. If a sprint was completed, then have to also edit the history of the issue so that it was added to the sprint before it was completed, preferably before it started. A completed sprint's issues also all have a resolution set before the completion date. If a sprint was not started, then have to edit the marker and copy the rank of each issue too. Args: sprint_id (int): the sprint to add issues to issue_keys (List[str]): the issues to add to the sprint Returns: Response

def add_remote_link(self, issue: str, destination: Union[Issue, Dict[str, Any]], globalId: Optional[str] = None, application: Optional[Dict[str, Any]] = None, relationship: Optional[str] = None) -> RemoteLink: (source)

Add a remote link from an issue to an external application and returns a remote link Resource for it. ``destination`` should be a dict containing at least ``url`` to the linked external URL and ``title`` to display for the link inside Jira. For definitions of the allowable fields for ``destination`` and the keyword arguments ``globalId``, ``application`` and ``relationship``, see https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+for+Remote+Issue+Links. Args: issue (str): the issue to add the remote link to destination (Union[Issue, Dict[str, Any]]): the link details to add (see the above link for details) globalId (Optional[str]): unique ID for the link (see the above link for details) application (Optional[Dict[str,Any]]): application information for the link (see the above link for details) relationship (Optional[str]): relationship description for the link (see the above link for details) Returns: RemoteLink: the added remote link

def add_simple_link(self, issue: str, object: Dict[str, Any]): (source)

Add a simple remote link from an issue to web resource. This avoids the admin access problems from add_remote_link by just using a simple object and presuming all fields are correct and not requiring more complex ``application`` data. ``object`` should be a dict containing at least ``url`` to the linked external URL and ``title`` to display for the link inside Jira For definitions of the allowable fields for ``object`` , see https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+for+Remote+Issue+Links. Args: issue (str): the issue to add the remote link to object (Dict[str,Any]): the dictionary used to create remotelink data Returns: RemoteLink

def add_user(self, username: str, email: str, directoryId: int = 1, password: str = None, fullname: str = None, notify: bool = False, active: bool = True, ignore_existing: bool = False, application_keys: Optional[List] = None): (source)

Create a new Jira user. Args: username (str): the username of the new user email (str): email address of the new user directoryId (int): The directory ID the new user should be a part of (Default: ``1``) password (Optional[str]): Optional, the password for the new user fullname (Optional[str]): Optional, the full name of the new user notify (bool): True to send a notification to the new user. (Default: ``False``) active (bool): True to make the new user active upon creation. (Default: ``True``) ignore_existing (bool): True to ignore existing users. (Default: ``False``) application_keys (Optional[list]): Keys of products user should have access to Raises: JIRAError: If username already exists and `ignore_existing` has not been set to `True`. Returns: bool: Whether the user creation was successful.

def add_user_to_group(self, username: str, group: str) -> Union[bool, Dict[str, Any]]: (source)

Add a user to an existing group. Args: username (str): Username that will be added to specified group. group (str): Group that the user will be added to. Returns: Union[bool,Dict[str,Any]]: json response from Jira server for success or a value that evaluates as False in case of failure.

@translate_resource_args
def add_vote(self, issue: Union[str, int]) -> Response: (source)

Register a vote for the current authenticated user on an issue. Args: issue (Union[str, int]): ID or key of the issue to vote on Returns: Response

@translate_resource_args
def add_watcher(self, issue: Union[str, int], watcher: str) -> Response: (source)

Add a user to an issue's watchers list. Args: issue (Union[str, int]): ID or key of the issue affected watcher (str): name of the user to add to the watchers list Returns: Response

@translate_resource_args
def add_worklog(self, issue: Union[str, int], timeSpent: Optional[str] = None, timeSpentSeconds: Optional[str] = None, adjustEstimate: Optional[str] = None, newEstimate: Optional[str] = None, reduceBy: Optional[str] = None, comment: Optional[str] = None, started: Optional[datetime.datetime] = None, user: Optional[str] = None) -> Worklog: (source)

Add a new worklog entry on an issue and return a Resource for it. Args: issue (Union[str, int]): the issue to add the worklog to timeSpent (Optional[str]): a worklog entry with this amount of time spent, e.g. "2d" timeSpentSeconds (Optional[str]): a worklog entry with this amount of time spent in seconds adjustEstimate (Optional[str]): allows the user to provide specific instructions to update the remaining time estimate of the issue. The value can either be ``new``, ``leave``, ``manual`` or ``auto`` (default). newEstimate (Optional[str]): the new value for the remaining estimate field. e.g. "2d" reduceBy (Optional[str]): the amount to reduce the remaining estimate by e.g. "2d" comment (Optional[str]): optional worklog comment started (Optional[datetime.datetime]): Moment when the work is logged, if not specified will default to now user (Optional[str]): the user ID or name to use for this worklog Returns: Worklog

def application_properties(self, key: str = None) -> Union[Dict[str, str], List[Dict[str, str]]]: (source)

Return the mutable server application properties. Args: key (Optional[str]): the single property to return a value for Returns: Union[Dict[str, str], List[Dict[str, str]]]

def applicationlinks(self, cached: bool = True) -> List: (source)

List of application links. Returns: List[Dict]: json, or empty list

@translate_resource_args
def assign_issue(self, issue: Union[int, str], assignee: Optional[str]) -> bool: (source)

Assign an issue to a user. Args: issue (Union[int, str]): the issue ID or key to assign assignee (str): the user to assign the issue to. None will set it to unassigned. -1 will set it to Automatic. Returns: bool

@no_type_check
def async_do(self, size: int = 10): (source)

Execute all asynchronous jobs and wait for them to finish. By default it will run on 10 threads. Args: size (int): number of threads to run on.

def attachment(self, id: str) -> Attachment: (source)

Get an attachment Resource from the server for the specified ID. Args: id (str): The Attachment ID Returns: Attachment

def attachment_meta(self) -> Dict[str, int]: (source)

Get the attachment metadata. Return: Dict[str, int]

@lru_cache(maxsize=None)
def avatars(self, entity='project'): (source)

Undocumented

def backup(self, filename: str = 'backup.zip', attachments: bool = False) -> Optional[Union[bool, int]]: (source)

Will call jira export to backup as zipped xml. Returning with success does not mean that the backup process finished. Args: filename (str): the filename for the backup (Default: "backup.zip") attachments (bool): True to also backup attachments (Default: ``False``) Returns: Union[bool, int]: Returns True if successful else it returns the statuscode of the Response or False

def backup_complete(self) -> Optional[bool]: (source)

Return boolean based on 'alternativePercentage' and 'size' returned from backup_progress (cloud only).

def backup_download(self, filename: str = None): (source)

Download backup file from WebDAV (cloud only).

def backup_progress(self) -> Optional[Dict[str, Any]]: (source)

Return status of cloud backup as a dict. Is there a way to get progress for Server version? Returns: Optional[Dict[str, Any]]

@translate_resource_args
def boards(self, startAt: int = 0, maxResults: int = 50, type: str = None, name: str = None, projectKeyOrID=None) -> ResultList[Board]: (source)

Get a list of board resources. Args: startAt: The starting index of the returned boards. Base index: 0. maxResults: The maximum number of boards to return per page. Default: 50 type: Filters results to boards of the specified type. Valid values: scrum, kanban. name: Filters results to boards that match or partially match the specified name. projectKeyOrID: Filters results to boards that match the specified project key or ID. Returns: ResultList[Board]

def client_info(self) -> str: (source)

Get the server this client is connected to.

def close(self): (source)

Undocumented

@translate_resource_args
def comment(self, issue: Union[int, str], comment: str, expand: Optional[str] = None) -> Comment: (source)

Get a comment Resource from the server for the specified ID. Args: issue (Union[int, str]): the issue ID or key to get the comment from comment (str): ID of the comment to get expand (Optional[str]): extra information to fetch for each comment such as renderedBody and properties. Returns: Comment

@translate_resource_args
def comments(self, issue: Union[int, str], expand: Optional[str] = None) -> List[Comment]: (source)

Get a list of comment Resources of the issue provided. Args: issue (Union[int, str]): the issue ID or key to get the comments from expand (Optional[str]): extra information to fetch for each comment such as renderedBody and properties. Returns: List[Comment]

def component(self, id: str): (source)

Get a component Resource from the server. Args: id (str): ID of the component to get

def component_count_related_issues(self, id: str): (source)

Get the count of related issues for a component. Args: id (str): ID of the component to use

@translate_resource_args
def confirm_project_avatar(self, project: str, cropping_properties: Dict[str, Any]): (source)

Confirm the temporary avatar image previously uploaded with the specified cropping. After a successful registry with :py:meth:`create_temp_project_avatar`, use this method to confirm the avatar for use. The final avatar can be a subarea of the uploaded image, which is customized with the ``cropping_properties``: the return value of :py:meth:`create_temp_project_avatar` should be used for this argument. Args: project (str): ID or key of the project to confirm the avatar in cropping_properties (Dict[str,Any]): a dict of cropping properties from :py:meth:`create_temp_project_avatar`

def confirm_user_avatar(self, user: str, cropping_properties: Dict[str, Any]): (source)

Confirm the temporary avatar image previously uploaded with the specified cropping. After a successful registry with :py:meth:`create_temp_user_avatar`, use this method to confirm the avatar for use. The final avatar can be a subarea of the uploaded image, which is customized with the ``cropping_properties``: the return value of :py:meth:`create_temp_user_avatar` should be used for this argument. Args: user (str): the user to confirm the avatar for cropping_properties (Dict[str,Any]): a dict of cropping properties from :py:meth:`create_temp_user_avatar`

def create_board(self, name: str, filter_id: str, project_ids: str = None, preset: str = 'scrum', location_type: Literal['user', 'project'] = 'user', location_id: Optional[str] = None) -> Board: (source)

Create a new board for the ``project_ids``. Args: name (str): name of the Board (<255 characters). filter_id (str): the Filter to use to create the Board. Note: if the user does not have the 'Create shared objects' permission and tries to create a shared board, a private board will be created instead (remember that board sharing depends on the filter sharing). project_ids (str): Deprecated. See location_id. preset (str): What preset/type to use for this Board, options: kanban, scrum, agility. (Default: "scrum") location_type (str): the location type. Available in Cloud. (Default: "user") location_id (Optional[str]): aka ``projectKeyOrId``. The id of Project that the Board should be located under. Omit this for a 'user' location_type. Available in Cloud. Returns: Board: The newly created board

@translate_resource_args
def create_component(self, name: str, project: str, description=None, leadUserName=None, assigneeType=None, isAssigneeTypeValid=False) -> Component: (source)

Create a component inside a project and return a Resource for it. Args: name (str): name of the component project (str): key of the project to create the component in description (str): a description of the component leadUserName (Optional[str]): the username of the user responsible for this component assigneeType (Optional[str]): see the ComponentBean.AssigneeType class for valid values isAssigneeTypeValid (bool): True specifies whether the assignee type is acceptable (Default: ``False``) Returns: Component

def create_customer(self, email: str, displayName: str) -> Customer: (source)

Create a new customer and return an issue Resource for it. Args: email (str): Customer Email displayName (str): Customer display name Returns: Customer

@no_type_check
def create_customer_request(self, fields: Dict[str, Any] = None, prefetch: bool = True, **fieldargs) -> Issue: (source)

Create a new customer request and return an issue Resource for it. Each keyword argument (other than the predefined ones) is treated as a field name and the argument's value is treated as the intended value for that field -- if the fields argument is used, all other keyword arguments will be ignored. By default, the client will immediately reload the issue Resource created by this method in order to return a complete Issue object to the caller; this behavior can be controlled through the 'prefetch' argument. Jira projects may contain many issue types. Some issue screens have different requirements for fields in a new issue. This information is available through the 'createmeta' set of methods. Further examples are available here: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Create+Issue Args: fields (Dict[str, Any]): a dict containing field names and the values to use. If present, all other keyword arguments will be ignored prefetch (bool): True reloads the created issue Resource so all of its data is present in the value returned (Default: ``True``) Returns: Issue

def create_filter(self, name: str = None, description: str = None, jql: str = None, favourite: bool = None) -> Filter: (source)

Create a new filter and return a filter Resource for it. Args: name (str): name of the new filter description (str): Useful human-readable description of the new filter jql (str): query string that defines the filter favourite (Optional[bool]): True adds this filter to the current user's favorites (Default: ``None``) Returns: Filter

def create_issue(self, fields: Optional[Dict[str, Any]] = None, prefetch: bool = True, **fieldargs) -> Issue: (source)

Create a new issue and return an issue Resource for it. Each keyword argument (other than the predefined ones) is treated as a field name and the argument's value is treated as the intended value for that field -- if the fields argument is used, all other keyword arguments will be ignored. By default, the client will immediately reload the issue Resource created by this method in order to return a complete Issue object to the caller; this behavior can be controlled through the 'prefetch' argument. Jira projects may contain many different issue types. Some issue screens have different requirements for fields in a new issue. This information is available through the 'createmeta' set of methods. Further examples are available here: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Create+Issue Args: fields (Optional[Dict[str, Any]]): a dict containing field names and the values to use. If present, all other keyword arguments will be ignored prefetch (bool): True reloads the created issue Resource so all of its data is present in the value returned (Default: ``True``) Returns: Issue

@translate_resource_args
def create_issue_link(self, type: Union[str, IssueLinkType], inwardIssue: str, outwardIssue: str, comment: Optional[Dict[str, Any]] = None) -> Response: (source)

Create a link between two issues. Args: type (Union[str,IssueLinkType]): the type of link to create inwardIssue: the issue to link from outwardIssue: the issue to link to comment (Optional[Dict[str, Any]]): a comment to add to the issues with the link. Should be a dict containing ``body`` and ``visibility`` fields: ``body`` being the text of the comment and ``visibility`` being a dict containing two entries: ``type`` and ``value``. ``type`` is ``role`` (or ``group`` if the Jira server has configured comment visibility for groups) and ``value`` is the name of the role (or group) to which viewing of this comment will be restricted. Returns: Response

def create_issues(self, field_list: List[Dict[str, Any]], prefetch: bool = True) -> List[Dict[str, Any]]: (source)

Bulk create new issues and return an issue Resource for each successfully created issue. See `create_issue` documentation for field information. Args: field_list (List[Dict[str, Any]]): a list of dicts each containing field names and the values to use. Each dict is an individual issue to create and is subject to its minimum requirements. prefetch (bool): True reloads the created issue Resource so all of its data is present in the value returned (Default: ``True``) Returns: List[Dict[str, Any]]

def create_project(self, key: str, name: str = None, assignee: str = None, ptype: str = 'software', template_name: str = None, avatarId=None, issueSecurityScheme=None, permissionScheme=None, projectCategory=None, notificationScheme=10000, categoryId=None, url: str = ''): (source)

Create a project with the specified parameters. Args: key (str): Mandatory. Must match Jira project key requirements, usually only 2-10 uppercase characters. name (Optional[str]): If not specified it will use the key value. assignee (Optional[str]): key of the lead, if not specified it will use current user. ptype (Optional[str]): Determines the type of project should be created. template_name (Optional[str]): is used to create a project based on one of the existing project templates. If `template_name` is not specified, then it should use one of the default values. Returns: Union[bool,int]: Should evaluate to False if it fails otherwise it will be the new project id.

def create_sprint(self, name: str, board_id: int, startDate: Optional[Any] = None, endDate: Optional[Any] = None) -> Sprint: (source)

Create a new sprint for the ``board_id``. Args: name (str): Name of the sprint board_id (int): Which board the sprint should be assigned. startDate (Optional[Any]): Start date for the sprint. endDate (Optional[Any]): End date for the sprint. Returns: Sprint: The newly created Sprint

@translate_resource_args
def create_temp_project_avatar(self, project: str, filename: str, size: int, avatar_img: bytes, contentType: str = None, auto_confirm: bool = False): (source)

Register an image file as a project avatar. The avatar created is temporary and must be confirmed before it can be used. Avatar images are specified by a filename, size, and file object. By default, the client will attempt to autodetect the picture's content type this mechanism relies on libmagic and will not work out of the box on Windows systems (see `Their Documentation <https://filemagic.readthedocs.io/en/latest/guide.html>`_ for details on how to install support). The ``contentType`` argument can be used to explicitly set the value (note that Jira will reject any type other than the well-known ones for images, e.g. ``image/jpg``, ``image/png``, etc.) This method returns a dict of properties that can be used to crop a subarea of a larger image for use. This dict should be saved and passed to :py:meth:`confirm_project_avatar` to finish the avatar creation process. If you want to cut out the middleman and confirm the avatar with Jira's default cropping, pass the 'auto_confirm' argument with a truthy value and :py:meth:`confirm_project_avatar` will be called for you before this method returns. Args: project (str): ID or key of the project to create the avatar in filename (str): name of the avatar file size (int): size of the avatar file avatar_img (bytes): file-like object holding the avatar contentType (str): explicit specification for the avatar image's content-type auto_confirm (bool): True to automatically confirm the temporary avatar by calling :py:meth:`confirm_project_avatar` with the return value of this method. (Default: ``False``)

def create_temp_user_avatar(self, user: str, filename: str, size: int, avatar_img: bytes, contentType: Any = None, auto_confirm: bool = False): (source)

Register an image file as a user avatar. The avatar created is temporary and must be confirmed before it can be used. Avatar images are specified by a filename, size, and file object. By default, the client will attempt to autodetect the picture's content type: this mechanism relies on ``libmagic`` and will not work out of the box on Windows systems (see `Their Documentation <https://filemagic.readthedocs.io/en/latest/guide.html>`_ for details on how to install support). The ``contentType`` argument can be used to explicitly set the value (note that Jira will reject any type other than the well-known ones for images, e.g. ``image/jpg``, ``image/png``, etc.) This method returns a dict of properties that can be used to crop a subarea of a larger image for use. This dict should be saved and passed to :py:meth:`confirm_user_avatar` to finish the avatar creation process. If you want to cut out the middleman and confirm the avatar with Jira's default cropping, pass the ``auto_confirm`` argument with a truthy value and :py:meth:`confirm_user_avatar` will be called for you before this method returns. Args: user (str): User to register the avatar for filename (str): name of the avatar file size (int): size of the avatar file avatar_img (bytes): file-like object containing the avatar contentType (Optional[Any]): explicit specification for the avatar image's content-type auto_confirm (bool): True to automatically confirm the temporary avatar by calling :py:meth:`confirm_user_avatar` with the return value of this method. (Default: ``False``)

@translate_resource_args
def create_version(self, name: str, project: str, description: str = None, releaseDate: Any = None, startDate: Any = None, archived: bool = False, released: bool = False) -> Version: (source)

Create a version in a project and return a Resource for it. Args: name (str): name of the version to create project (str): key of the project to create the version in description (str): a description of the version releaseDate (Optional[Any]): the release date assigned to the version startDate (Optional[Any]): The start date for the version archived (bool): True to create an archived version. (Default: ``False``) released (bool): True to create a released version. (Default: ``False``) Returns: Version

def createmeta(self, projectKeys: Optional[Union[Tuple[str, str], str]] = None, projectIds: Union[List, Tuple[str, str]] = [], issuetypeIds: Optional[List[str]] = None, issuetypeNames: Optional[str] = None, expand: Optional[str] = None) -> Dict[str, Any]: (source)

Get the metadata required to create issues, optionally filtered by projects and issue types. Args: projectKeys (Optional[Union[Tuple[str, str], str]]): keys of the projects to filter the results with. Can be a single value or a comma-delimited string. May be combined with projectIds. projectIds (Union[List, Tuple[str, str]]): IDs of the projects to filter the results with. Can be a single value or a comma-delimited string. May be combined with projectKeys. issuetypeIds (Optional[List[str]]): IDs of the issue types to filter the results with. Can be a single value or a comma-delimited string. May be combined with issuetypeNames. issuetypeNames (Optional[str]): Names of the issue types to filter the results with. Can be a single value or a comma-delimited string. May be combined with issuetypeIds. expand (Optional[str]): extra information to fetch inside each resource. Returns: Dict[str, Any]

def createmeta_fieldtypes(self, projectIdOrKey: Union[str, int], issueTypeId: Union[str, int]) -> Dict[str, Any]: (source)

Get the field metadata for a given project and issue type, required to create issues. This API was introduced in JIRA Server / DC 8.4 as a replacement for the more general purpose API 'createmeta'. For details see: https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html Args: projectIdOrKey (Union[str, int]): id or key of the project for which to get the metadata. issueTypeId (Union[str, int]): id of the issue type for which to get the metadata. Returns: Dict[str, Any]

def createmeta_issuetypes(self, projectIdOrKey: Union[str, int]) -> Dict[str, Any]: (source)

Get the issue types metadata for a given project, required to create issues. This API was introduced in JIRA Server / DC 8.4 as a replacement for the more general purpose API 'createmeta'. For details see: https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html Args: projectIdOrKey (Union[str, int]): id or key of the project for which to get the metadata. Returns: Dict[str, Any]

def current_user(self, field: Optional[str] = None) -> str: (source)

Return the `accountId` (Cloud) else `username` of the current user. For anonymous users it will return a value that evaluates as False. Args: field (Optional[str]): the name of the identifier field. Defaults to "accountId" for Jira Cloud, else "username" Returns: str: User's `accountId` (Cloud) else `username`.

def custom_field_option(self, id: str) -> CustomFieldOption: (source)

Get a custom field option Resource from the server. Args: id (str): ID of the custom field to use Returns: CustomFieldOption

def dashboard(self, id: str) -> Dashboard: (source)

Get a dashboard Resource from the server. Args: id (str): ID of the dashboard to get. Returns: Dashboard

def dashboards(self, filter=None, startAt=0, maxResults=20) -> ResultList[Dashboard]: (source)

Return a ResultList of Dashboard resources and a ``total`` count. Args: filter (Optional[str]): either "favourite" or "my", the type of dashboards to return startAt (int): index of the first dashboard to return (Default: ``0``) maxResults (int): maximum number of dashboards to return. If maxResults set to False, it will try to get all items in batches. (Default: ``20``) Returns: ResultList

def deactivate_user(self, username: str) -> Union[str, int]: (source)

Disable/deactivate the user. Args: username (str): User to be deactivated. Returns: Union[str, int]

def delete_attachment(self, id: str) -> Response: (source)

Delete attachment by id. Args: id (str): ID of the attachment to delete Returns: Response

def delete_board(self, id): (source)

Delete an agile board.

def delete_component(self, id: str) -> Response: (source)

Delete component by id. Args: id (str): ID of the component to use Returns: Response

def delete_issue_link(self, id: str): (source)

Delete a link between two issues. Args: id (str): ID of the issue link to delete

def delete_permissionscheme(self, id: str): (source)

Undocumented

def delete_project(self, pid: Union[str, Project]) -> Optional[bool]: (source)

Delete project from Jira. Args: pid (Union[str, Project]): Jira projectID or Project or slug Raises: JIRAError: If project not found or not enough permissions ValueError: If pid parameter is not Project, slug or ProjectID Returns: bool: True if project was deleted

@translate_resource_args
def delete_project_avatar(self, project: str, avatar: str) -> Response: (source)

Delete a project's avatar. Args: project (str): ID or key of the project to delete the avatar from avatar (str): ID of the avatar to delete Returns: Response

@translate_resource_args
def delete_remote_link(self, issue: Union[str, Issue], *, internal_id: Optional[str] = None, global_id: Optional[str] = None) -> Response: (source)

Delete remote link from issue by internalId or globalId. Args: issue (str): Key (or Issue) of Issue internal_id (Optional[str]): InternalID of the remote link to delete global_id (Optional[str]): GlobalID of the remote link to delete Returns: Response

def delete_screen(self, id: str): (source)

Undocumented

def delete_user(self, username: str) -> bool: (source)

Deletes a Jira User. Args: username (str): Username to delete Returns: bool: Success of user deletion

def delete_user_avatar(self, username: str, avatar: str) -> Response: (source)

Delete a user's avatar. Args: username (str): the user to delete the avatar from avatar (str): ID of the avatar to remove Returns: Response

@translate_resource_args
def editmeta(self, issue: Union[str, int]): (source)

Get the edit metadata for an issue. Args: issue (Union[str, int]): the issue to get metadata for Returns: Dict[str, Dict[str, Dict[str, Any]]]

def favourite_filters(self) -> List[Filter]: (source)

Get a list of filter Resources which are the favourites of the currently authenticated user. Returns: List[Filter]

def fields(self) -> List[Dict[str, Any]]: (source)

Return a list of all issue fields. Returns: List[Dict[str, Any]]

def filter(self, id: str) -> Filter: (source)

Get a filter Resource from the server. Args: id (str): ID of the filter to get. Returns: Filter

def find(self, resource_format: str, ids: Union[Tuple[str, str], int, str] = '') -> Resource: (source)

Find Resource object for any addressable resource on the server. This method is a universal resource locator for any REST-ful resource in Jira. The argument ``resource_format`` is a string of the form ``resource``, ``resource/{0}``, ``resource/{0}/sub``, ``resource/{0}/sub/{1}``, etc. The format placeholders will be populated from the ``ids`` argument if present. The existing authentication session will be used. The return value is an untyped Resource object, which will not support specialized :py:meth:`.Resource.update` or :py:meth:`.Resource.delete` behavior. Moreover, it will not know to return an issue Resource if the client uses the resource issue path. For this reason, it is intended to support resources that are not included in the standard Atlassian REST API. Args: resource_format (str): the subpath to the resource string ids (Optional[Tuple]): values to substitute in the ``resource_format`` string Returns: Resource

def find_transitionid_by_name(self, issue: Union[str, int], transition_name: str) -> Optional[int]: (source)

Get a transitionid available on the specified issue to the current user. Look at https://developer.atlassian.com/static/rest/jira/6.1.html#d2e1074 for json reference Args: issue (Union[str, int]): ID or key of the issue to get the transitions from transition_name (str): name of transition we are looking for Returns: Optional[int]: returns the id is found None when it's not

def get_igrid(self, issueid: str, customfield: str, schemeid: str): (source)

Undocumented

def get_issue_type_scheme_associations(self, id: str) -> List[Project]: (source)

For the specified issue type scheme, returns all of the associated projects. (Admin required). Args: id (str): The issue type scheme id. Returns: List[Project]: Associated Projects for the Issue Type Scheme.

@translate_resource_args
def get_project_version_by_name(self, project: str, version_name: str) -> Optional[Version]: (source)

Get a version Resource by its name present on a project. Args: project (str): ID or key of the project to get versions from version_name (str): name of the version to search for Returns: Optional[Version]

def group(self, id: str, expand: Any = None) -> Group: (source)

Get a group Resource from the server. Args: id (str): ID of the group to get expand (Optional[Any]): Extra information to fetch inside each resource Returns: Group

def group_members(self, group: str) -> OrderedDict: (source)

Return a hash or users with their information. Requires Jira 6.0 or will raise NotImplemented. Args: group (str): Name of the group.

def groups(self, query: Optional[str] = None, exclude: Optional[Any] = None, maxResults: int = 9999) -> List[str]: (source)

Return a list of groups matching the specified criteria. Args: query (Optional[str]): filter groups by name with this string exclude (Optional[Any]): filter out groups by name with this string maxResults (int): maximum results to return. (Default: ``9999``) Returns: List[str]

def incompletedIssuesEstimateSum(self, board_id: str, sprint_id: str): (source)

Return the total incompleted points this sprint.

def issue(self, id: Union[Issue, str], fields: Optional[str] = None, expand: Optional[str] = None, properties: Optional[str] = None) -> Issue: (source)

Get an issue Resource from the server. Args: id (Union[Issue, str]): ID or key of the issue to get fields (Optional[str]): comma-separated string of issue fields to include in the results expand (Optional[str]): extra information to fetch inside each resource properties (Optional[str]): extra properties to fetch inside each result Returns: Issue

def issue_link(self, id: str) -> IssueLink: (source)

Get an issue link Resource from the server. Args: id (str): ID of the issue link to get Returns: IssueLink

def issue_link_type(self, id: str) -> IssueLinkType: (source)

Get an issue link type Resource from the server. Args: id (str): ID of the issue link type to get Returns: IssueLinkType

def issue_link_types(self, force: bool = False) -> List[IssueLinkType]: (source)

Get a list of issue link type Resources from the server. Args: force (bool): True forces an update of the cached IssueLinkTypes. (Default: ``False``) Returns: List[IssueLinkType]

@translate_resource_args
def issue_properties(self, issue: str) -> List[IssueProperty]: (source)

Get a list of issue property Resource from the server for an issue. Args: issue (str): ID or key of the issue to get properties from Returns: List[IssueProperty]

@translate_resource_args
def issue_property(self, issue: str, key: str) -> IssueProperty: (source)

Get a specific issue property Resource from the server. Args: issue (str): ID or key of the issue to get the property from key (str): Key of the property to get Returns: IssueProperty

def issue_type(self, id: str) -> IssueType: (source)

Get an issue type Resource from the server. Args: id (str): ID of the issue type to get Returns: IssueType

def issue_type_by_name(self, name: str, project: Optional[str] = None) -> IssueType: (source)

Get issue type by name. Args: name (str): Name of the issue type project (str): Key or ID of the project. If set, only issue types available for that project will be looked up. Returns: IssueType

@lru_cache(maxsize=None)
def issue_type_schemes(self) -> List[IssueTypeScheme]: (source)

Get all issue type schemes defined (Admin required). Returns: List[IssueTypeScheme]: All the Issue Type Schemes available to the currently logged in user.

def issue_types(self) -> List[IssueType]: (source)

Get a list of issue type Resources from the server. Returns: List[IssueType]

def issue_types_for_project(self, projectIdOrKey: str) -> List[IssueType]: (source)

Get a list of issue types available within the project. Each project has a set of valid issue types and each issue type has a set of valid statuses. The valid statuses for a given issue type can be extracted via: `issue_type_x.statuses` Returns: List[IssueType]

@lru_cache(maxsize=None)
def issuesecurityschemes(self): (source)

Undocumented

def kill_session(self) -> Response: (source)

Destroy the session of the current authenticated user. Returns: Response

def kill_websudo(self) -> Optional[Response]: (source)

Destroy the user's current WebSudo session. Works only for non-cloud deployments, for others does nothing. Returns: Optional[Response]

def move_to_backlog(self, issue_keys: List[str]) -> Response: (source)

Move issues in ``issue_keys`` to the backlog, removing them from all sprints that have not been completed. Args: issue_keys (List[str]): the issues to move to the backlog Raises: JIRAError: If moving issues to backlog fails Returns: Response

def move_version(self, id: str, after: str = None, position: str = None) -> Version: (source)

Move a version within a project's ordered version list and return a new version Resource for it. One, but not both, of ``after`` and ``position`` must be specified. Args: id (str): ID of the version to move after (str): the self attribute of a version to place the specified version after (that is, higher in the list) position (Optional[str]): the absolute position to move this version to: must be one of ``First``, ``Last``, ``Earlier``, or ``Later`` Returns: Version

def my_permissions(self, projectKey: Optional[str] = None, projectId: Optional[str] = None, issueKey: Optional[str] = None, issueId: Optional[str] = None, permissions: Optional[str] = None) -> Dict[str, Dict[str, Dict[str, str]]]: (source)

Get a dict of all available permissions on the server. ``permissions`` is a comma-separated value list of permission keys that is required in Jira Cloud. For possible and allowable permission values, see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions Args: projectKey (Optional[str]): limit returned permissions to the specified project projectId (Optional[str]): limit returned permissions to the specified project issueKey (Optional[str]): limit returned permissions to the specified issue issueId (Optional[str]): limit returned permissions to the specified issue permissions (Optional[str]): limit returned permissions to the specified csv permission keys (cloud required field) Returns: Dict[str, Dict[str, Dict[str, str]]]

def myself(self) -> Dict[str, Any]: (source)

Get a dict of server information for this Jira instance. Returns: Dict[str, Any]

@lru_cache(maxsize=None)
def notificationschemes(self): (source)

Undocumented

@lru_cache(maxsize=None)
def permissionschemes(self): (source)

Undocumented

def priorities(self) -> List[Priority]: (source)

Get a list of priority Resources from the server. Returns: List[Priority]

def priority(self, id: str) -> Priority: (source)

Get a priority Resource from the server. Args: id (str): ID of the priority to get Returns: Priority

def project(self, id: str, expand: Optional[str] = None) -> Project: (source)

Get a project Resource from the server. Args: id (str): ID or key of the project to get expand (Optional[str]): extra information to fetch for the project such as projectKeys and description. Returns: Project

@translate_resource_args
def project_avatars(self, project: str): (source)

Get a dict of all avatars for a project visible to the current authenticated user. Args: project (str): ID or key of the project to get avatars for

@translate_resource_args
def project_components(self, project: str) -> List[Component]: (source)

Get a list of component Resources present on a project. Args: project (str): ID or key of the project to get components from Returns: List[Component]

@translate_resource_args
def project_issue_security_level_scheme(self, project: str) -> IssueSecurityLevelScheme: (source)

Get a IssueSecurityLevelScheme Resource from the server. Args: project (str): ID or key of the project to get the IssueSecurityLevelScheme for Returns: IssueSecurityLevelScheme: The issue security level scheme

@translate_resource_args
def project_notification_scheme(self, project: str) -> NotificationScheme: (source)

Get a NotificationScheme Resource from the server. Args: project (str): ID or key of the project to get the NotificationScheme for Returns: NotificationScheme: The notification scheme

@translate_resource_args
def project_permissionscheme(self, project: str) -> PermissionScheme: (source)

Get a PermissionScheme Resource from the server. Args: project (str): ID or key of the project to get the permissionscheme for Returns: PermissionScheme: The permission scheme

@translate_resource_args
def project_priority_scheme(self, project: str) -> PriorityScheme: (source)

Get a PriorityScheme Resource from the server. Args: project (str): ID or key of the project to get the PriorityScheme for Returns: PriorityScheme: The priority scheme

@translate_resource_args
def project_role(self, project: str, id: str) -> Role: (source)

Get a role Resource. Args: project (str): ID or key of the project to get the role from id (str): ID of the role to get Returns: Role

@translate_resource_args
def project_roles(self, project: str) -> Dict[str, Dict[str, str]]: (source)

Get a dict of role names to resource locations for a project. Args: project (str): ID or key of the project to get roles from Returns: Dict[str, Dict[str, str]]

@translate_resource_args
def project_versions(self, project: str) -> List[Version]: (source)

Get a list of version Resources present on a project. Args: project (str): ID or key of the project to get versions from Returns: List[Version]

@translate_resource_args
def project_workflow_scheme(self, project: str) -> WorkflowScheme: (source)

Get a WorkflowScheme Resource from the server. Args: project (str): ID or key of the project to get the WorkflowScheme for Returns: WorkflowScheme: The workflow scheme

@lru_cache(maxsize=None)
def projectcategories(self): (source)

Undocumented

def projects(self, expand: Optional[str] = None) -> List[Project]: (source)

Get a list of project Resources from the server visible to the current authenticated user. Args: expand (Optional[str]): extra information to fetch for each project such as projectKeys and description. Returns: List[Project]

def rank(self, issue: str, next_issue: Optional[str] = None, prev_issue: Optional[str] = None) -> Response: (source)

Rank an issue before/after another using the default Ranking field, the one named 'Rank'. Pass only ONE of `next_issue` or `prev_issue`. Args: issue (str): issue key of the issue to be ranked before/after the second one. next_issue (str): issue key that the first issue is to be ranked before. prev_issue (str): issue key that the first issue is to be ranked after. Returns: Response

def reindex(self, force: bool = False, background: bool = True) -> bool: (source)

Start jira re-indexing. Returns True if reindexing is in progress or not needed, or False. If you call reindex() without any parameters it will perform a background reindex only if Jira thinks it should do it. Args: force (bool): True to reindex even if Jira doesn't say this is needed. (Default: ``False``) background (bool): True to reindex in background, slower but does not impact the users. (Default: ``True``) Returns: bool: True if reindexing is in progress or not needed

@translate_resource_args
def remote_link(self, issue: Union[str, int], id: str) -> RemoteLink: (source)

Get a remote link Resource from the server. Args: issue (Union[str, int]): the issue holding the remote link id (str): ID of the remote link Returns: RemoteLink

@translate_resource_args
def remote_links(self, issue: Union[str, int]) -> List[RemoteLink]: (source)

Get a list of remote link Resources from an issue. Args: issue (Union[str, int]): the issue to get remote links from Returns: List[RemoteLink]

def remove_group(self, groupname: str) -> bool: (source)

Delete a group from the Jira instance. Args: groupname (str): The group to be deleted from the Jira instance. Returns: bool: Returns True on success.

def remove_user_from_group(self, username: str, groupname: str) -> bool: (source)

Remove a user from a group. Args: username (str): The user to remove from the group. groupname (str): The group that the user will be removed from. Returns: bool

@translate_resource_args
def remove_vote(self, issue: Union[str, int]): (source)

Remove the current authenticated user's vote from an issue. Args: issue (Union[str, int]): ID or key of the issue to remove vote on

@translate_resource_args
def remove_watcher(self, issue: Union[str, int], watcher: str) -> Response: (source)

Remove a user from an issue's watch list. Args: issue (Union[str, int]): ID or key of the issue affected watcher (str): name of the user to remove from the watchers list Returns: Response

def removed_issues(self, board_id: str, sprint_id: str): (source)

Return the completed issues for the sprint. Returns: List[Issue]

def removedIssuesEstimateSum(self, board_id: str, sprint_id: str): (source)

Return the total incompleted points this sprint.

def rename_user(self, old_user: str, new_user: str): (source)

Rename a Jira user. Args: old_user (str): Old username login new_user (str): New username login

@translate_resource_args
def rename_version(self, project: str, old_name: str, new_name: str): (source)

Rename a version Resource on a project. Args: project (str): ID or key of the project to get versions from old_name (str): old name of the version to rename new_name (str): new name of the version to rename

def request_type_by_name(self, service_desk: ServiceDesk, name: str): (source)

Undocumented

def request_types(self, service_desk: ServiceDesk) -> List[RequestType]: (source)

Returns request types supported by a service desk instance. Args: service_desk (ServiceDesk): The service desk instance. Returns: List[RequestType]

def resolution(self, id: str) -> Resolution: (source)

Get a resolution Resource from the server. Args: id (str): ID of the resolution to get Returns: Resolution

def resolutions(self) -> List[Resolution]: (source)

Get a list of resolution Resources from the server. Returns: List[Resolution]

def role(self) -> List[Dict[str, Any]]: (source)

Return Jira role information. Returns: List[Dict[str,Any]]: List of current user roles

@lru_cache(maxsize=None)
def screens(self): (source)

Undocumented

def search_allowed_users_for_issue(self, user: str, issueKey: str = None, projectKey: str = None, startAt: int = 0, maxResults: int = 50) -> ResultList: (source)

Get a list of user Resources that match a username string and have browse permission for the issue or project. Args: user (str): a string to match usernames against. issueKey (Optional[str]): find users with browse permission for this issue. projectKey (Optional[str]): find users with browse permission for this project. startAt (int): index of the first user to return. (Default: ``0``) maxResults (int): maximum number of users to return. If maxResults evaluates as False, it will try to get all items in batches. (Default: ``50``) Returns: ResultList

def search_assignable_users_for_issues(self, username: Optional[str] = None, project: Optional[str] = None, issueKey: Optional[str] = None, expand: Optional[Any] = None, startAt: int = 0, maxResults: int = 50, query: Optional[str] = None): (source)

Get a list of user Resources that match the search string for assigning or creating issues. "username" query parameter is deprecated in Jira Cloud; the expected parameter now is "query", which can just be the full email again. But the "user" parameter is kept for backwards compatibility, i.e. Jira Server/Data Center. This method is intended to find users that are eligible to create issues in a project or be assigned to an existing issue. When searching for eligible creators, specify a project. When searching for eligible assignees, specify an issue key. Args: username (Optional[str]): A string to match usernames against project (Optional[str]): Filter returned users by permission in this project (expected if a result will be used to create an issue) issueKey (Optional[str]): Filter returned users by this issue (expected if a result will be used to edit this issue) expand (Optional[Any]): Extra information to fetch inside each resource startAt (int): Index of the first user to return (Default: ``0``) maxResults (int): maximum number of users to return. If maxResults evaluates as False, it will try to get all items in batches. (Default: ``50``) query (Optional[str]): Search term. It can just be the email. Returns: ResultList

def search_assignable_users_for_projects(self, username: str, projectKeys: str, startAt: int = 0, maxResults: int = 50) -> ResultList: (source)

Get a list of user Resources that match the search string and can be assigned issues for projects. Args: username (str): A string to match usernames against projectKeys (str): Comma-separated list of project keys to check for issue assignment permissions startAt (int): Index of the first user to return (Default: ``0``) maxResults (int): Maximum number of users to return. If maxResults evaluates as False, it will try to get all users in batches. (Default: ``50``) Returns: ResultList

def search_issues(self, jql_str: str, startAt: int = 0, maxResults: int = 50, validate_query: bool = True, fields: Optional[Union[str, List[str]]] = '*all', expand: Optional[str] = None, properties: Optional[str] = None, json_result: bool = False) -> Union[Dict[str, Any], ResultList[Issue]]: (source)

Get a :class:`~jira.client.ResultList` of issue Resources matching a JQL search string. Args: jql_str (str): The JQL search string. startAt (int): Index of the first issue to return. (Default: ``0``) maxResults (int): Maximum number of issues to return. Total number of results is available in the ``total`` attribute of the returned :class:`ResultList`. If maxResults evaluates to False, it will try to get all issues in batches. (Default: ``50``) validate_query (bool): True to validate the query. (Default: ``True``) fields (Optional[Union[str, List[str]]]): comma-separated string or list of issue fields to include in the results. Default is to include all fields. expand (Optional[str]): extra information to fetch inside each resource properties (Optional[str]): extra properties to fetch inside each result json_result (bool): True to return a JSON response. When set to False a :class:`ResultList` will be returned. (Default: ``False``) Returns: Union[Dict,ResultList]: Dict if ``json_result=True``

def search_users(self, user: Optional[str] = None, startAt: int = 0, maxResults: int = 50, includeActive: bool = True, includeInactive: bool = False, query: Optional[str] = None) -> ResultList[User]: (source)

Get a list of user Resources that match the specified search string. "username" query parameter is deprecated in Jira Cloud; the expected parameter now is "query", which can just be the full email again. But the "user" parameter is kept for backwards compatibility, i.e. Jira Server/Data Center. Args: user (Optional[str]): a string to match usernames, name or email against. startAt (int): index of the first user to return. maxResults (int): maximum number of users to return. If maxResults evaluates as False, it will try to get all items in batches. includeActive (bool): True to include active users in the results. (Default: ``True``) includeInactive (bool): True to include inactive users in the results. (Default: ``False``) query (Optional[str]): Search term. It can just be the email. Returns: ResultList[User]

def security_level(self, id: str) -> SecurityLevel: (source)

Get a security level Resource. Args: id (str): ID of the security level to get Returns: SecurityLevel

def server_info(self) -> Dict[str, Any]: (source)

Get a dict of server information for this Jira instance. Returns: Dict[str, Any]

def service_desk(self, id: str) -> ServiceDesk: (source)

Get a Service Desk Resource from the server. Args: id (str): ID or key of the Service Desk to get Returns: ServiceDesk

def service_desks(self) -> List[ServiceDesk]: (source)

Get a list of ServiceDesk Resources from the server visible to the current authenticated user. Returns: List[ServiceDesk]

def session(self) -> User: (source)

Get a dict of the current authenticated user's session information. Returns: User

def set_application_property(self, key: str, value: str): (source)

Set the application property. Args: key (str): key of the property to set value (str): value to assign to the property

@translate_resource_args
def set_project_avatar(self, project: str, avatar: str): (source)

Set a project's avatar. Args: project (str): ID or key of the project to set the avatar on avatar (str): ID of the avatar to set

def set_user_avatar(self, username: str, avatar: str) -> Response: (source)

Set a user's avatar. Args: username (str): the user to set the avatar for avatar (str): ID of the avatar to set Returns: Response

def sprint(self, id: int) -> Sprint: (source)

Return the information about a sprint. Args: sprint_id (int): the sprint retrieving issues from Returns: Sprint

def sprint_info(self, board_id: str, sprint_id: str) -> Dict[str, Any]: (source)

Return the information about a sprint. Args: board_id (str): the board retrieving issues from. Deprecated and ignored. sprint_id (str): the sprint retrieving issues from Returns: Dict[str, Any]

@translate_resource_args
def sprints(self, board_id: int, extended: Optional[bool] = None, startAt: int = 0, maxResults: int = 50, state: str = None) -> ResultList[Sprint]: (source)

Get a list of sprint Resources. Args: board_id (int): the board to get sprints from extended (bool): Deprecated. startAt (int): the index of the first sprint to return (0 based) maxResults (int): the maximum number of sprints to return state (str): Filters results to sprints in specified states. Valid values: `future`, `active`, `closed`. You can define multiple states separated by commas Returns: ResultList[Sprint]: List of sprints.

def sprints_by_name(self, id: Union[str, int], extended: bool = False, state: str = None) -> Dict[str, Dict[str, Any]]: (source)

Get a dictionary of sprint Resources where the name of the sprint is the key. Args: board_id (int): the board to get sprints from extended (bool): Deprecated. state (str): Filters results to sprints in specified states. Valid values: `future`, `active`, `closed`. You can define multiple states separated by commas Returns: Dict[str, Dict[str, Any]]: dictionary of sprints with the sprint name as key

def status(self, id: str) -> Status: (source)

Get a status Resource from the server. Args: id (str): ID of the status resource to get Returns: Status

def statuscategories(self) -> List[StatusCategory]: (source)

Get a list of status category Resources from the server. Returns: List[StatusCategory]

def statuscategory(self, id: int) -> StatusCategory: (source)

Get a status category Resource from the server. Args: id (int): ID of the status category resource to get Returns: StatusCategory

def statuses(self) -> List[Status]: (source)

Get a list of all status Resources from the server. Refer to :py:meth:`JIRA.issue_types_for_project` for getting statuses for a specific issue type within a specific project. Returns: List[Status]

def supports_service_desk(self): (source)

Returns if the Jira instance supports service desk. Returns: bool

@lru_cache(maxsize=None)
def templates(self) -> Dict: (source)

Undocumented

@translate_resource_args
def transition_issue(self, issue: Union[str, int], transition: str, fields: Optional[Dict[str, Any]] = None, comment: Optional[str] = None, worklog: Optional[str] = None, **fieldargs): (source)

Perform a transition on an issue. Each keyword argument (other than the predefined ones) is treated as a field name and the argument's value is treated as the intended value for that field -- if the fields argument is used, all other keyword arguments will be ignored. Field values will be set on the issue as part of the transition process. Args: issue (Union[str, int]): ID or key of the issue to perform the transition on transition (str): ID or name of the transition to perform fields (Optional[Dict[str,Any]]): a dict containing field names and the values to use. comment (Optional[str]): String to add as comment to the issue when performing the transition. worklog (Optional[str]): String to add as time spent on the issue when performing the transition. **fieldargs: If present, all other keyword arguments will be ignored

@translate_resource_args
def transitions(self, issue: Union[str, int], id: Optional[str] = None, expand=None): (source)

Get a list of the transitions available on the specified issue to the current user. Args: issue (Union[str, int]): ID or key of the issue to get the transitions from id (Optional[str]): if present, get only the transition matching this ID expand (Optional): extra information to fetch inside each transition Returns: Any: json of response

def update_filter(self, filter_id, name: str = None, description: str = None, jql: str = None, favourite: bool = None): (source)

Update a filter and return a filter Resource for it. Args: name (Optional[str]): name of the new filter description (Optional[str]): Useful human-readable description of the new filter jql (Optional[str]): query string that defines the filter favourite (Optional[bool]): True to add this filter to the current user's favorites (Default: ``None``)

def update_sprint(self, id: Union[str, int], name: Optional[str] = None, startDate: Optional[Any] = None, endDate: Optional[Any] = None, state: Optional[str] = None) -> Dict[str, Any]: (source)

Updates the sprint with the given values. Args: id (Union[str, int]): The id of the sprint to update name (Optional[str]): The name to update your sprint to startDate (Optional[Any]): The start date for the sprint endDate (Optional[Any]): The start date for the sprint state: (Optional[str]): The start date for the sprint Returns: Dict[str, Any]

def user(self, id: str, expand: Optional[Any] = None) -> User: (source)

Get a user Resource from the server. Args: id (str): ID of the user to get expand (Optional[Any]): Extra information to fetch inside each resource Returns: User

def user_avatars(self, username: str) -> Dict[str, Any]: (source)

Get a dict of avatars for the specified user. Args: username (str): the username to get avatars for Returns: Dict[str, Any]

def version(self, id: str, expand: Any = None) -> Version: (source)

Get a version Resource. Args: id (str): ID of the version to get expand (Optional[Any]): extra information to fetch inside each resource Returns: Version

def version_count_related_issues(self, id: str): (source)

Get a dict of the counts of issues fixed and affected by a version. Args: id (str): the version to count issues for

def version_count_unresolved_issues(self, id: str): (source)

Get the number of unresolved issues for a version. Args: id (str): ID of the version to count issues for

@translate_resource_args
def votes(self, issue: Union[str, int]) -> Votes: (source)

Get a votes Resource from the server. Args: issue (Union[str, int]): ID or key of the issue to get the votes for Returns: Votes

@translate_resource_args
def watchers(self, issue: Union[str, int]) -> Watchers: (source)

Get a watchers Resource from the server for an issue. Args: issue (Union[str, int]): ID or key of the issue to get the watchers for Returns: Watchers

@lru_cache(maxsize=None)
def workflows(self): (source)

Undocumented

@lru_cache(maxsize=None)
def workflowscheme(self): (source)

Undocumented

@translate_resource_args
def worklog(self, issue: Union[str, int], id: str) -> Worklog: (source)

Get a specific worklog Resource from the server. Args: issue (Union[str, int]): ID or key of the issue to get the worklog from id (str): ID of the worklog to get Returns: Worklog

@translate_resource_args
def worklogs(self, issue: Union[str, int]) -> List[Worklog]: (source)

Get a list of worklog Resources from the server for an issue. Args: issue (Union[str, int]): ID or key of the issue to get worklogs from Returns: List[Worklog]

DEFAULT_OPTIONS = (source)

Undocumented

Value
{'server': 'http://localhost:2990/jira',
 'auth_url': '/rest/auth/1/session',
 'context_path': '/',
 'rest_path': 'api',
 'rest_api_version': '2',
 'agile_rest_path': AgileResource.AGILE_BASE_REST_PATH,
 'agile_rest_api_version': '1.0',
...
checked_version: bool = (source)

Undocumented

Undocumented

authCookie = (source)

Undocumented

deploymentType = (source)

Undocumented

Undocumented

sys_version_info = (source)

Undocumented

Return the server url. Returns: str

Undocumented

def _add_client_cert_to_session(self): (source)

Adds the client certificate to the session. If configured through the constructor. https://docs.python-requests.org/en/master/user/advanced/#client-side-certificates - str: a single file (containing the private key and the certificate) - Tuple[str,str] a tuple of both files’ paths

def _add_ssl_cert_verif_strategy_to_session(self): (source)

Adds verification strategy for host SSL certificates. If configured through the constructor. https://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification - str: Path to a `CA_BUNDLE` file or directory with certificates of trusted CAs. - bool: True/False

def _check_for_html_error(self, content: str): (source)

Undocumented

def _check_update_(self): (source)

Check if the current version of the library is outdated.

def _create_cookie_auth(self, auth: Tuple[str, str], timeout: Optional[Union[None, float, Tuple[float, float], Tuple[float, None]]] = None): (source)

Undocumented

def _create_http_basic_session(self, username: str, password: str, timeout: Optional[Union[None, float, Tuple[float, float], Tuple[float, None]]] = None): (source)

Creates a basic http session. Args: username (str): Username for the session password (str): Password for the username timeout (Optional[int]): If set determines the connection/read timeout delay for the Session. Returns: ResilientSession

def _create_jwt_session(self, jwt, timeout: Optional[Union[Union[float, int], Tuple[float, float]]]): (source)

Undocumented

def _create_kerberos_session(self, timeout: Optional[Union[None, float, Tuple[float, float], Tuple[float, None]]], kerberos_options=None): (source)

Undocumented

def _create_oauth_session(self, oauth, timeout: Optional[Union[Union[float, int], Tuple[float, float]]]): (source)

Undocumented

def _create_token_session(self, token_auth: str, timeout: Optional[Union[None, float, Tuple[float, float], Tuple[float, None]]] = None): (source)

Creates token-based session. Header structure: "authorization": "Bearer <token_auth>".

def _fetch_pages(self, item_type: Type[ResourceType], items_key: Optional[str], request_path: str, startAt: int = 0, maxResults: int = 50, params: Dict[str, Any] = None, base: str = JIRA_BASE_URL) -> ResultList[ResourceType]: (source)

Fetch from a paginated end point. Args: item_type (Type[Resource]): Type of single item. ResultList of such items will be returned. items_key (Optional[str]): Path to the items in JSON returned from server. Set it to None, if response is an array, and not a JSON object. request_path (str): path in request URL startAt (int): index of the first record to be fetched. (Default: ``0``) maxResults (int): Maximum number of items to return. If maxResults evaluates as False, it will try to get all items in batches. (Default:50) params (Dict[str, Any]): Params to be used in all requests. Should not contain startAt and maxResults, as they will be added for each request created from this function. base (str): base URL to use for the requests. Returns: ResultList

def _find_for_resource(self, resource_cls: Any, ids: Union[Tuple[str, str], Tuple[Union[str, int], str], int, str], expand=None) -> Any: (source)

Uses the find method of the provided Resource class. Args: resource_cls (Any): Any instance of :py:class`Resource` ids (Union[Tuple[str, str], int, str]): The arguments to the Resource's ``find()`` expand ([type], optional): The value for the expand property in the Resource's ``find()`` params. Defaults to None. Raises: JIRAError: If the Resource cannot be found Returns: Any: A class of the same type as ``resource_cls``

def _gain_sudo_session(self, options, destination): (source)

Undocumented

def _get_batch_size(self, item_type: Type[ResourceType]) -> Optional[int]: (source)

Return the batch size for the given resource type from the options. Check if specified item-type has a mapped batch-size, else try to fallback to batch-size assigned to `Resource`, else fallback to Backend-determined batch-size. Returns: Optional[int]: The batch size to use. When the configured batch size is None, the batch size should be determined by the JIRA-Backend.

def _get_items_from_page(self, item_type: Type[ResourceType], items_key: Optional[str], resource: Dict[str, Any]) -> List[ResourceType]: (source)

Undocumented

def _get_json(self, path: str, params: Dict[str, Any] = None, base: str = JIRA_BASE_URL): (source)

Get the json for a given path and params. Args: path (str): The subpath required params (Optional[Dict[str, Any]]): Parameters to filter the json query. base (Optional[str]): The Base Jira URL, defaults to the instance base. Returns: Union[Dict[str, Any], List[Dict[str, str]]]

def _get_latest_url(self, path: str, base: str = JIRA_BASE_URL) -> str: (source)

Returns the full url based on Jira base url and the path provided. Using the latest API endpoint. Args: path (str): The subpath desired. base (Optional[str]): The base url which should be prepended to the path Returns: str: Fully qualified URL

def _get_mime_type(self, buff: bytes) -> Optional[str]: (source)

Get the MIME type for a given stream of bytes. Args: buff (bytes): Stream of bytes Returns: Optional[str]: the MIME type

def _get_sprint_field_id(self): (source)

Undocumented

def _get_url(self, path: str, base: str = JIRA_BASE_URL) -> str: (source)

Returns the full url based on Jira base url and the path provided. Using the API version specified during the __init__. Args: path (str): The subpath desired. base (Optional[str]): The base url which should be prepended to the path Returns: str: Fully qualified URL

def _get_user_id(self, user: Optional[str]) -> Optional[str]: (source)

Internal method for translating a user search (str) to an id. Return None and -1 unchanged. This function uses :py:meth:`JIRA.search_users` to find the user and then using :py:meth:`JIRA._get_user_identifier` extracts the relevant identifier property depending on whether the instance is a Cloud or self-hosted Instance. Args: user (Optional[str]): The search term used for finding a user. None, '-1' and -1 are equivalent to 'Unassigned'. Raises: JIRAError: If any error occurs. Returns: Optional[str]: The Jira user's identifier. Or "-1" and None unchanged.

def _get_user_identifier(self, user: User) -> str: (source)

Get the unique identifier depending on the deployment type. - Cloud: 'accountId' - Self Hosted: 'name' (equivalent to username). Args: user (User): a User object Returns: str: the User's unique identifier.

def _set_avatar(self, params, url, avatar): (source)

Undocumented

def _try_magic(self): (source)

Undocumented

def _update_fields_cache(self): (source)

Update the cache used for `self._fields_cache`.

_applicationlinks = (source)

Undocumented

_cached_issue_link_types = (source)

Undocumented

_fields_cache_value: dict = (source)

Undocumented

Undocumented

_options: Dict[str, Any] = (source)

Undocumented

Undocumented

_session = (source)

Undocumented

_version = (source)

Undocumented

@property
_fields_cache: Dict[str, str] = (source)

Cached dictionary of {Field Name: Field ID}. Lazy loaded.

Return whether we are on a Cloud based Jira instance.