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

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 votes

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 Champion Aug 01, 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()) 

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 Champion Aug 01, 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.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot