List all issue ID's of a Version with JIRA Python

tony cameraman September 6, 2018

I have a few issues under a Version ID: "12345" Version Name:"ABCD". Using jira.version_count_unresolved_issues(projID) i can get number of unresolved issues. but i need the Issue Id.

My code to get all the version:

jira = JIRA(options={'server': 'address', 'verify':'/path/to/ca.crt'}, basic_auth=("usrName","password"))

jra = jira.project('NAME')

versions = jira.project_versions(jra)

print(jira.version_count_unresolved_issues(VersionID) )

 

After this i need the IssueID or the name of Issues under Particular Version

1 answer

1 accepted

1 vote
Answer accepted
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 6, 2018

Hi @tony cameraman 

Try using search_issues:

query = jira.search_issues(        
jql_str="project=NAME AND fixVersion=ABCD AND resolution=Unresolved"
)    

for i in query:        
print(i.id)

 

tony cameraman September 7, 2018

that is working perfectly fine. But, now i have another problem. for                                                       "fixversions=ABCD - /Driver". So this " - "is causing me an error. Is there any options available to include that as a string?

Or is tit possible to pass as an argument

tony cameraman September 7, 2018

oh i got it.. replaced / with the \\u002f and it is working. thank you for the help

Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 7, 2018

Fantastic. Glad you got it working!

Suggest an answer

Log in or Sign up to answer