Forums

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

How to find issues where specific user has a project role with jql?

Sesegma Tsydypova September 3, 2021

Hello,

My goal is to find all issues where user has a project role using jql. For instance, what jql woud be for all issues where "John" has a project role "Developer"?

I tried memberOfRole() function of ScriptRunner plugin, but it doesn't work as I expected.

I am new to Jira, maybe I'm missing something obvious.

 

2 answers

0 votes
Daniel Ebers
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 8, 2021

Hi @Sesegma Tsydypova

I seem to understand "John" could be in a different field than just "reporter" - but I think, then you would to define in which one. For example extended by an ... or assignee = john ... PLUS any other custom field he could be in. Does this make sense?
Jira needs to know where to look for John (I understand in the developer role but as far as I know there is no option to say: "same time look in all fields").

Regards,
Daniel

0 votes
Radek Dostál
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 3, 2021

I can't really see the documentation for the memberOfRole function, but judging by it's parameters (Field, Role, Role[2], ..), to find issue where john is the reporter, you'd first use the usual query:

reporter = john

Then to filter further and check where the reporter is a developer in the project the issue belong to,

issueFunction in memberOfRole(reporter, "Developers")

 

Combining this then to:

repoter = john and issueFunction in memberOfRole(reporter, "Developers")

 

Roughly equals to "issues where john is reporter, and also a developer of the project".

Sesegma Tsydypova September 6, 2021

Thank you, but it's not actually what I want. 

"John" may not be a reporter in these issues

Suggest an answer

Log in or Sign up to answer