Installation¶
pip install jira-agile-toolbox
API documentation¶
- class jira_agile_toolbox.JiraAgileToolBox(jira_client)¶
a class which helps you do agile things with jira
- Parameters
jira_client (jira.JIRA) – an instance of jira.JIRA
Example
>>> from jira import JIRA >>> jira_client = JIRA("https://jira.atlassian.org") >>> jat = JiraAgileToolBox(jira_client)
- get_storypoints_from_epic(epic)¶
searches for the epic and returns the number of storypoints as a dict
- Parameters
epic (str jira.Issue) – the epic key or a jira Issue
- Returns
a dictionary containing total story points
- Return type
dict
Example
>>> from jira_agile_toolbox import JiraAgileToolBox >>> from jira import JIRA >>> my_jira_client = JIRA("https://my-jira-server.com", basic_auth("MYUSERNAME","MYPASSWORD") >>> tb = JiraAgileToolBox(my_jira_client) >>> tb.get_storypoints_from_epic("JAT-001") {'total': 100, "Reported": 50, "Closed": 50}
- rank_issues_at_top_of_project(ranked_list, project)¶
moves the provided ranked_list at the top of the backlog of the given project
- Parameters
ranked_list – a list of jira Issues
project (str) – project key
Example
>>> from jira_agile_toolbox import JiraAgileToolBox >>> from jira import JIRA >>> my_jira_client = JIRA("https://my-jira-server.com", basic_auth("MYUSERNAME","MYPASSWORD") >>> tb = JiraAgileToolBox(my_jira_client) >>> tb.rank_issues_by_list([my_jira_client.issue("JAT-001"), my_jira_client.issue("JAT-003")])
will produce following result
before
after
JAT-010
JAT-001
JAT-005
JAT-003
JAT-003
JAT-010
JAT-002
JAT-005
JAT-001
JAT-002
- rank_issues_by_list(ranked_list, on_top_of_issue)¶
sorts the provided list by rank on top of the latter issue
- Parameters
ranked_list – list of issues to be sorted by rank index 0 has highest rank
on_top_of_issue – issue on top of which these issues need to land
Example
>>> from jira_agile_toolbox import JiraAgileToolBox >>> from jira import JIRA >>> my_jira_client = JIRA("https://my-jira-server.com", basic_auth("MYUSERNAME","MYPASSWORD") >>> tb = JiraAgileToolBox(my_jira_client) >>> tb.rank_issues_by_list([my_jira_client.issue("JAT-001"), my_jira_client.issue("JAT-003")], my_jira_client.issue("JAT-005"))
will rank issues like:
before
after
JAT-010
JAT-010
JAT-005
JAT-001
JAT-003
JAT-003
JAT-002
JAT-005
JAT-001
JAT-002