How to write JQL to find last assignee of a issue was in a specific user role of specific project?

Alana Fernando
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.
August 1, 2017

I want to filter out ticket list which matches below criteria,

  1. tickets assignee changed within last 5 days.
  2. tickets in project "LCH"
  3. and assignee was in "client" role.

currently i have below query which is by the way not working. 

assignee was in usersInRole("LCH", "Client") and assignee changed AFTER startOfDay(-5d)

 

thank you in advance,

1 answer

1 accepted

3 votes
Answer accepted
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2017

Hello Alana,

It seems that you are using JQL tricks plugin, (usersInRole) function.

From the docs it seems it supports only "in" operator and not "was in" operator as was in operator searches the history of the issue-

usersInRole([project],role) 

Function To find issues based on users in a specific role in a specific project. Project role made optional in 7.0.

Since : v1.0

Usage:

  • assignee in usersInRole("TST","Administrators") - Returns all the issues assigned to one of the Administrator of project 'TST'
  • assignee in usersInRole("Administrators") - Returns all the issues assigned to users with Administrator role in any of the projects.
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2017

For the part "tickets assignee changes in last 5 days" you can try this , as it's working

assignee changed DURING (startOfDay(-5),now()) 
Alana Fernando
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.
August 1, 2017

Yes Tarun, i think you are correct. but still is there a way of filtering out my requirement?

I mean is there a way append assignee was in client role to the JQL you provided above? 

 

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2017

JRIA out of the box doesn't provide way to filter on roles, the JQL tricks plugin provides to filter based on current state but your requirement is "was in" thus not only current but past as well. Hence right now I am not sure about it, I will come back to you if something comes to my mind.

Alana Fernando
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.
August 1, 2017

Thanks Tarun

Alana Fernando
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.
April 2, 2018

hi @Tarun Sapra, some jtrics functions are not associating with assignee.

 

I tried assignee was in user in role ("Client") but JIRA shows and error that saying 

"A value provided by the function 'usersInRole' is invalid for the field 'assignee'."

 

therefore considering current situation i am accepting your answer which is 

JRIA out of the box doesn't provide way to filter on roles, the JQL tricks plugin provides to filter based on current state but your requirement is "was in" thus not only current but past as well. Hence right now I am not sure about it, I will come back to you if something comes to my mind.

thanks for the help 

Manjunath May 22, 2019
assignee changed DURING (startOfDay(-5),now()) 

Thanks a lot  

Like Christopher Beach likes this

Suggest an answer

Log in or Sign up to answer