I can get epics with the wonderful jira-python project liks this:
jira_connection = JIRA(constants.JIRA_URL, basic_auth=(constants.JIRA_USER_NAME, constants.JIRA_PASSWORD))
jql_query = 'issuetype=Epic'
epics = jira_connection.search_issues(jql_query)
and I can get issues with a different jql_query:
jql_query = 'project=UI'
Of all the fabulous information that comes back for one epic or for one issue, what element indicates that the issue is in the epic, or that the epic contains the issue?
I've been looking both ways, from epic to issue and from issue to epic, particularly searching for the id of one in the data elements of the other, but no luck.
For example, my sample epic has an id of 302486. When examining an issue in the epic, known to be in the epic as seen in the regular Jira UI, I hoped to find an element on the issue with a value of 302486, the epic's id.
Alas, I'm not finding one.
I know that I can use the REST API and loop through all the epics with a REST API call for each one to get their issues, but I'd rather not convert my project to REST API and give up the fantastic ease of use of jira-python.
Plus, I'm harvesting data, so having an API call for each epic isn't optimal
Is there any element returned by search_issues in jira-python that will give the epic to issue or issue to epic relationship? Or any more clever idea?
Thanks so much for a great tool, and any suggestions you may have for a solution.
You could try this :
proj = jira.search_issues("'Epic Link' is not EMPTY and project = 'your project(s)'")
It will list all issue that belong to an epic. After that with a loop you can access to the epic issue number.
The code below give you access to the epic link issue number.
for i in proj:
I think with loop you can get more informations if you need too
Hope this helps.
If you want to know the id of the epic link field you need to read this documentation :
Just replace customfield_10405 with the good id.
Hope this helps
Hi everyone! My name is Jenny, a Product Manager at Atlassian. After launching Team @mentions in Confluence, we heard a lot of positive feedback from customers that they love how easy it is to @men...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events