JQL filter to show issues based on a user's JIRA Service Desk Organization affiliations

Our company is running JIRA server 7.X with JIRA Service Desk as an add on.  The version of JIRA Service Desk we are running includes the ability to create and add Organizations to help share requests - very cool feature.

Our company has over 4,000 employees. We use JIRA Service Desk to process employee time off requests.  When a time off request is entered in the Service Desk, it is added to a Team Calendar in Confluence.  Every employee in the company uses the same Team Calendar in Confluence to view time off requests, but people are only able to see the requests they have permission to view.  So in other words, though people are all looking at the same calendar, they only see their own requests, or the requests that are shared with them.

We use JQL filtered JIRA issue event types to pull this off.  As an example, the JQL filter we use to show someone their own leave on the Team Calendar is:

project = LV AND reporter = (currentUser())

Our employees also have the option of sharing their request with other employees using one of two different ways.

1.  On the time off JIRA Service Desk form, we have created a custom field called "Shared with".  Employees who are requesting time off can enter other employee names in the "Shared with" field on creation (comma separate value list of user names).  When the time off request is submitted, a workflow post function adds the list of user names to the "Request participants" field in the Service Desk.  The request is shared on the Team Calendar.

2.  Or, employees can add an Organization to their request.  The Organization is pre-populated with user names.  This makes it easier on the employee who is requesting time off if they want to share their time off request with a large group of employees, and don't want to type each name individually.

Regarding #1, it's easy to come up with a JQL filter to show a user requests based on whether or not their user name is included in the "Shared with" or "Request participants" field.  It looks like this:

project = LV and (currentUser()) in "Shared with"

However, for #2, I have no idea how to write a JQL query to determine if (currentUser()) is in one of the Organizations that was added to the time off request.

Does anyone know how to write this JQL query?



2 answers

1 vote
Susan Hauth Community Champion Jun 21, 2017

HI Brett,

I too am having similar problems with the Organization. It seems very unfriendly to JQL.   There are a number of issues raised with Atlassian such as not sortable JSDSERVER-4548 and JSDSERVER-5085.

I would really like the ability to have jql Organization is EMPTY. 


Susan, thank you for your reply.  I agree.  It is such a great capability to be able to add Organizations to Service Desk tickets.  Sharing becomes so much easier.  However, we need to be able to harness the power of JQL to meet all of our needs.  Hopefully Atlassian will provide some fixes soon.

Hi Susan,


It is possible to use Organization = Empty in JQL rather than Organization is Empty. Hope this helps.

Like 1 person likes this

Coul you try to use 'Organizations' instead of 'Organization'? 'Organizations' should work. Example: Organizations = Empty

THANK YOU for the "organizations = empty" comment.  Why this is the only field in the universe that works that way is beyond me, but anyway, this helped me a bunch.  Thanks!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira Service Desk

What's new in Jira Service Desk Server: Introducing 4.0 & more - Feb 2019

Hello Atlassian Community!  I'm Teresa, the Product Marketing Manager   for Jira Service Desk Server at Atlassian. I'm excited to announce two exciting releases for Jira Service De...

389 views 1 1
Read article

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