JIRA Client

This module is used to add some JIRA queries on top of the Python JIRA module.

class SPU.jira_client.JiraClient(url, authtype, username=None, password=None)[source]

A jira component used to create connections to jira and do jira related tasks

add_share_permissions(filter_id)[source]

Updates the share permissions for a filter to share with any logged in user.

Parameters:filter_id (String) – The filter ID to update
Returns:Nothing
create_board(name, project, filter_id, type='scrum')[source]

Updates a boards filter based on a filter ID. Note: Project is not used but kept for future updates to JIRA to specify board location.

Parameters:
  • name (String) – Board ID
  • project (String) – Project name
  • filter_id (String) – Filter ID
  • type (String) – Type of board to create
Returns:

Response

Return type:

JSON

create_filter(name, jql, favorite=False)[source]

Create a filter

Parameters:
  • name (String) – Name of filter
  • jql (String) – JQL to use for filter
  • favorite (Bool) – Set this filter as favourite (default = False)
Returns:

Response

Return type:

JSON

get_auth_object()[source]

Returns Auth object based on auth type :return : Auth Object

get_favourite_filters()[source]

Get all favorite filters for user.

req_kwargs

Set the key-word arguments for python-requests depending on the auth type. This code should run on demand exactly once, which is why it is a property. :return dict _req_kwargs: dict with the right options to pass in

update_filter(name, jql, filter_id)[source]

Function to update a filter.

Parameters:
  • name (String) – Filter Name
  • jql (String) – Filter JQL
  • filter_id (Int) – Filter ID