Forums

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

Jira filter component size

Ibrahim Erdogan March 10, 2022

Hi, 

i want to search for issues which have more than 2 components.

I tried: AND component = ("3"). Is there a way to write a filter which performces the way i described?

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Champion
March 10, 2022

Hi @Ibrahim Erdogan ,

welcome to the Atlassian community!

Unfortunately you can't do that. As a workaround, you need to create a scripted filed (through script runner) with a numeric value that return number of components for each issue.

So, you can filter based on that new field.

Hope this helps,

Fabio

Ibrahim Erdogan March 10, 2022

Hi, 

tanks!

I got 1200 issues which i have to analyze. So doing this manually would take a lot of time. Do you think its faster with the scripted file thing ( i never tried that before, so i think it would take a lot of time either). What do you think?

 

KR

Ibrahim

Fabio Racobaldo _Herzum_
Community Champion
March 10, 2022

Scripted Field, with code inside, will calculate this for you for all existing issues. You need just to spend time to setup this field and to write 5 lines of code.

Fabio

Ibrahim Erdogan March 10, 2022

what should the code look like?

Fabio Racobaldo _Herzum_
Community Champion
March 10, 2022

Do you have Script Runner app to setup a scripted field?

Fabio Racobaldo _Herzum_
Community Champion
March 10, 2022

BTW, code of your scripted field should be :

return issue.getComponentObjects().size()

this should solve your issue.

Fabio

Ibrahim Erdogan March 10, 2022

Thank you, i got everything now. 

Like • Fabio Racobaldo _Herzum_ likes this
Fabio Racobaldo _Herzum_
Community Champion
March 10, 2022

if it worked please mark my answer as accepted!

Suggest an answer

Log in or Sign up to answer