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?

Thanks.

 

1 answer

1 votes
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.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

499 views 1 15
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
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