Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update jira-restapi python issue status filtered by components

ninaatt
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!
June 18, 2019

I'm trying to update lira issue status if only matches the component name, the code doesn't throw any error by not updating status

 

issues_in_proj = jira.search_issues('project=proj')
components = jira.project_components('proj')

for issue in issues_in_proj:

  if ("Progress" in issue.fields.status.name and components == "name"):
     jira.transition_issue(issue, 'transition id')
     print(' executing script')
return "successful"

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
January 29, 2021

Hi!

you need to fix on filter level

issues_in_proj = jira.search_issues('project=proj')

to 

issues_in_proj = jira.search_issues('project=proj and component="Name"')

Suggest an answer

Log in or Sign up to answer