Skip to content

Commit 3b7ad5d

Browse files
author
Gonchik Tsymzhitov
committed
Add formatted examples
1 parent a23048a commit 3b7ad5d

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

atlassian/jira.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,11 +1764,11 @@ def get_project_permission_scheme(self, project_id_or_key, expand=None):
17641764
params["expand"] = expand
17651765
return self.get(url, params=params)
17661766

1767-
def issue_types(self):
1767+
def get_issue_types(self):
17681768
"""
17691769
Return all issue types
17701770
"""
1771-
return self.get('rest/api/2/issuetype')
1771+
return self.get("rest/api/2/issuetype")
17721772

17731773
def create_issue_type(self, name, description="", type="standard"):
17741774
"""
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
from atlassian import Jira
22

3-
jira = Jira(
4-
url='http://localhost:8080', username='admin', password='admin')
3+
jira = Jira(url="http://localhost:8080", username="admin", password="admin")
54

6-
issue_types = jira.issue_types()
5+
issue_types = jira.get_issue_types()
76
print("Enter projects category:")
87
category = input()
98

109
for i in issue_types:
1110

12-
issue_type = i['name']
11+
issue_type = i["name"]
1312
jql_all = 'issuetype = "{0}"'.format(issue_type)
14-
number = jira.jql(jql_all)['total']
13+
number = jira.jql(jql_all)["total"]
1514
jql_of_category = 'issuetype = "{0}" AND category = {1}'.format(issue_type, category)
16-
number_of_deprecated = jira.jql(jql_of_category)['total']
15+
number_of_deprecated = jira.jql(jql_of_category)["total"]
1716
if number > 0:
1817
percent_of_deprecated = number_of_deprecated / number * 100
1918
else:
2019
percent_of_deprecated = 0
2120
percentage = round(percent_of_deprecated, 1)
22-
print('{0}, {1}, {2}% of {3}'.format(issue_type, number, percentage, category))
21+
print("{0}, {1}, {2}% of {3}".format(issue_type, number, percentage, category))
File renamed without changes.

0 commit comments

Comments
 (0)