python jira return the content of a filter
Asked Answered
S

1

7

I'm new in jira python and I want to have a list with tickets obtained with an existing filter.

I tried jira.filter(id) but instead receiving the list with issue, I received only the name of the filter. Using jira.search_issue is working, but because my filter can be change by other guys I need something that will take in account those changes of filter content. Any ideas? Thanks!

Splenetic answered 11/5, 2015 at 13:2 Comment(0)
A
11

Use filter ID in jira.search_issue.

for i in jira.search_issues('filter=25471'):
    print i.key
Acentric answered 11/5, 2015 at 16:34 Comment(4)
Thanks a lot. This is exactly what I needed. I was sure that should be something easy :).Splenetic
Note that this only returns the first 50 issues by default, you must use issues = jira.search_issues('filter=25471', maxResults=300) if you want more.Borglum
What to do if I want the filter ID to be a variable? I have multiple filters and I would like to search_issues multiple times.Beckham
@PranitiGupta you could do 'filter={}'.format(<YOUR VARIABLE>)Acentric

© 2022 - 2024 — McMap. All rights reserved.