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 accepted

1 vote

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.

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 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

152 views 1 17
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