Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

If currentUser is member of group X, show issues with label Y (or something similar)

Hi,

I'm trying to figure out a way to do the following:

If currentUser is member of group X, show issues with label Y

I'm pretty certain my above search is not possible the way I wrote it, but can I get the sought-after result in another way? Been scratching my head for a while, can't seem to find a good solution for this.

Doesn't have to be with labels specifically, but I think you get the idea.

I guess what I'm after is a form of "Assign to group" and have one system dashboard that works no matter which "group" you are in.

1 answer

0 votes

Hello Simon,

Can you please let us know where are you trying to run the query you informed? Is it in an automation plugin or in the own JIRA JQL filter? Should the users from other group be restricted from seeming issues with the label Y or this is only to build a customized filter with an easy display for each team?

If you are configuring it on a JQL query, I think you got the wrong idea of the JQL functionality. There's no way to make conditional queries using JQL, this is only a search language and not works for programming.

If you are trying to display different issues depending on a specific users group, I would recommend you to create one filter per group and then share it only with the users you need. 

Taking your own scenario as an example, I would create a JQL filter like labels = y and share the filter only with the group X.

In fact, you can use labels or even custom fields to identify the group that should be working on the issue.

It's Jira JQL filter I'm talking about, being well aware that I'm wanting the dog to purr. The vagueness of this is due to me not really being able to work out a proper work around with the tools in front of me.

I want to create a system dashboard that works for all members, with some sort of group classification, where you only see the issues that are relevant to your team.

Let's say we have Mary in team A and Ken in team B. We have label A and B to correspond to the teams.

When Mary logs in, she sees the system dashboard. On the dashboard, there is a filter result that displays all open ticket with label "A". The filter doesn't show issues with other labels (or more specifically, issues without label "A").

When Ken logs in, it's the same thing, but for label "B". He doesn't see anything with e.g. label "A".

 

I can't rely on users using different dashboards or create their own, just getting them to understand how to navigate Jira in the first place can be a challenge, and I have to create the environment to need as little administration as possible in the long run (i.e., when I'm no longer part of this board).

I don't know if there is some ingenious way of getting the result I want with another approach, but I do know I can't do this the exact way I'm envisioning it. 

Hello Simon,

Thank you for your detailed answer.

I believe that the only way that you can do this kind of configuration would be by adding a user picker (Multiple Users) custom field that must be filled in the creation of the issue, so you will be able to filter your gadget with the following JQL:

"user picker custom field" = currentUser()

Performing the steps above, your gadget will only display the issues where the current user is one of the users added to the Custom field.

Also, the user picker (Multiple Users) custom field can be filled with an entire group, so you will not need to flag every single user everytime you create a new ticket:

Screen Shot 2018-10-01 at 16.46.15.png

Please, let me know if this option would work for you, Simon.

Like Marcela likes this

Thank you for the input. I will look at it more closely later this week and return once I've tinkered with it.

I greatly appreciate the effort to help me find a good solution.

We're glad to help you, Simon.

Please, let us know if the option provided has worked for you once you have tested it.

Dear @Petter Gonçalves ,

has anything changed in this procedure in the last years or do I still need a user field for currentUser()?

I have the same problem and would like to display tickets in a JQL query only if the current user is in a certain group.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

159 views 1 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you