-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStory.py
33 lines (23 loc) · 937 Bytes
/
Story.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class Story():
def __init__(self, json):
self.json=json
def get_story(self):
stories=[]
for story in self.json["issues"]:
try:
key=story["key"]
developer=''
for storyDeveloper in story["fields"]["customfield_12866"]:
if (developer!=''):
developer=developer+';'
developer=developer+storyDeveloper["displayName"]
sp=story["fields"]["customfield_10242"] #story point
status=story["fields"]["status"]["name"]
bug=0
for subtask in story["fields"]["subtasks"]:
if (subtask["fields"]["issuetype"]["name"]=="Bug Sub-Task"):
bug+=1
except (TypeError):
continue
stories.append([key,developer,sp,status,bug])
return stories