Hi!
I'm trying to get some information from Jira Software (server) via Python script. What I have to do is:
- Get key, summary, issuetype and status from issues based on a JQL filter - DONE
- Get what issues are linked to these issues I've just got, like, which issues are blocked by or blocks other issues? I need the key of these issues, but when I use issue_link = [issue.fields.issuelinks] command, it just gives me some number which are not the issue key - PROBLEM HERE
See my code bellow:
key_blk = [issue]
issuetype = [issue.fields.issuetype]
summary_blk = [issue.fields.summary]
status_blk = [issue.fields.status]
issue_link = [issue.fields.issuelinks]
for i in jira.search_issues('project = GPD AND issueLinkType in (blocks, "is blocked by")', maxResults=5):
issue=i
key_blk.append(issue)
issuetype.append(issue.fields.issuetype)
summary_blk.append(issue.fields.summary)
status_blk.append(issue.fields.status)
issue_link.append(issue.fields.issuelinks)
a = {'key': key_blk, 'issuetype': issuetype , 'Summary': summary_blk, 'Status': status_blk,'link':issue_link}
df = pd.DataFrame.from_dict(a, orient='index')
df.transpose()
Example of result from 'link' column: [58209]
Does anyone knows how to solve it?
Thanks in advance :)
Hi @Filipe Fantini ,
I believe that is the issue number. You may need to use another call to get the linked issue number 58209 and retrieve the issue key. I am not sure about python, but via restapi we can get it via /rest/api/2/issue/58209?fields=key . This may work :)
Hi @Niranjan , I've been trying but I think I'm doing wrong in terms of code syntax/logic, but your idea is awesome, I didn't realize that!
About restapi I've not much knowledge honestly, but I'll search deeper about that.
Many thanks!!! :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.