How to get issue id from Jira in Python?

John Paco
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 2, 2022

https://confluence.atlassian.com/jirakb/how-to-get-issue-id-from-the-jira-user-interface-827341428.html

This Link describes how to get issue id from the Jira User Interface.

Is it possible to get This id in Python with using Jira-Rest-Api?

2 answers

0 votes
svegesna
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2023

I'm using JIRA python library

from jira import JIRA, JIRAError

You can use search_issues and try ti get the key using issue.key. 

def getIssues(self):
query = "project='Your Project'"
issues = self.jira.search_issues(query, maxResults=False, fields=['key'])
for issue in issues:
keys = {issue.id: issue.key}
return keys
0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2022

Hi @John Paco 

Welcome to the community 🙂

Here's the python wrapper you can play around to get the data

https://atlassian-python-api.readthedocs.io/

Let me know if you have any queries

Thanks,

Pramodh

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events