JQL to find all issues created by a member of my groups

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2024

So this is a bit of a weird one that I don't even think is possible but you never know someone has an idea!

I'm looking for a way to have a dynamic JQL where I can get all the issues that were created by a member of the currentUser() their group.

I'm away that this would return all at first since every user will be part of the default access group (-users) so I'd have to exclude that.

Pretty much the logic would be

  • get all the groups the current user is in
  • get all the members of those groups (excluding the default access one)
  • get all issues created by those members

 

Ideally it would be something like creator IN memberOf(currentUser().Groups) but that doesn't exist :)

If we were to have a possibility to mark a group as a users "creator group" that would have been easier but sadly that's not the case..

 

Anybody got some ideas?

 

3 answers

2 votes
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2024

Hi @Dirk Ronsmans, You're right that Jira does not natively support creating a dynamic JQL query that directly retrieves all issues created by members of the same groups as the current user (while excluding the default access group). 

As a workaround, you may try something like below:

creator in (membersOf("group1") OR membersOf("group2") ...) AND creator != currentUser()
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2024

Hey @Manoj Gangwar ,

That would indeed be the fallback option. The thing is we want to use this one filter for a dashboard and thus it would need to be generic. 

By defining the groups in the query we lose that.

0 votes
Dan -minware-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2024

Disclaimer: 3rd party marketplace partner

Hey @Dirk Ronsmans as others have mentioned this is not natively available but we should be able to help with minware.

The language is simple with minQL:

     ticket.get('creator')

Here is an example from our live demo where I am filtering to show all tickets where Bryce Bruce was the creator:

 

ticket_creator.png

 

We could just as easily list the creator next to each ticket or group by team / format this however you would like. 

Sounds like an interesting project - we offer a free trial if you want to check it out!

 

0 votes
Sushant Verma
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2024

Hi @Dirk Ronsmans 

I am not sure it will work, but if you are using ScriptRunner, you can use the following query:

issueFunction in issueFieldMatch("project = YOUR_PROJECT", "creator", "in groupMembers(currentUser())")

Regards,
Sushant Verma

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2024

Hey @Sushant Verma ,

We have scriptrunner enhanced search so it's definitely an option. I tried that specific query tho (with the correct project key of course) but keep getting 0 issues returned.

I would think I get at least my own issues back too?

I'm guessing the last part 

in groupMembers(currentUser())

might not be giving the right value although the query is considered valid. Is there any way you know of to troubleshoot this?

Sushant Verma
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2024

@Dirk Ronsmans Can you try this?

issueFunction in issueFieldMatch("project = YOUR_PROJECT", "creator", "in groupMembers(currentUser())") AND NOT creator in membersOf("-users")

 Regards,
Sushant Verma

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events