Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,449
Community Members
 
Community Events
177
Community Groups

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

Atlassian Community Events