Getting the user domain in JQL

I need to find issues where the current user should not be the reporter, neither should his/hers company team mates be. So I want to find issues other companies have reported.

I have now this question:

project = "Testing Project for Alerts" and reporter != currentUser() and Company != "applico.be" AND status in (Open, Evaluating)

(company = reporter domain from Jira toolkit plugin)

This solves the problem for one customer but I would like it to be more generic so all users can use the same filter/question. Is thera a way I can get the user domain from the current user, or is there other smart ways of resolving this problem?

Very thankful for respons!

4 answers

Assuming the user's email address has his domain, you can probably use a Kepler custom field (SIL) to process the users's email address and extract the domain. They have basic string functions that should be able to extract the portion of the email address that you need.

https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.keplercf

http://confluence.kepler-rominfo.com/display/SIL/currentUser

http://confluence.kepler-rominfo.com/display/SIL/userEmailAddress

http://confluence.kepler-rominfo.com/display/SIL/String+Routines

Cool, thanks I will have a look at that!

There is also a getUserProperty function as well that might help out as well.

Hi Susanne,

One way would be is adding members into a custom user group and run a JQL with "reporter not in membersOf("applico-team")" where applico-team would be the custom user group.

Other way would be using JIRA Toolkit Plugin where you can add a custom field (text searcher) and search the context, also defined here: https://answers.atlassian.com/questions/135650/how-to-search-for-issues-created-by-a-user-with-a-particular-domain-in-its-email-address

Hope that helps.

Mehmet

Thanks for the reply. But, what I need is a generic way to do this. If I create a specific filter for each customer group there is no problem. What I would like to do is to say that the currentuser domain should not be the same as the reporter domain. But that seems hard. Or the current user domain is not part of the domain in company (a reporter domain field on the issue).

I think going into generic way requires custom coding like a plugin or JQL function using scirptrunner.

Thanks! I will look into that possibility.

Hi,
I think that there are two ways to do it:
The first, using issue security level, like this:
Create custom field group type (group picker)
When issue created, set value of custom field group type with the group of reporter
Adding a security level to an issue security scheme in your project
Adding custom field group type to a Security Level
The second is to use the project permission scheme:
Create custom field group type (group picker)
When issue created, set value of custom field group type with the group of reporter
In project permission scheme add to Browse Projects the custom field group

Important: When you use one of this ways, users in this group can not browse issues of other users groups.

Thanks for the reply! The thing is they should see the issues but this question is to be used for creating a todolist. So security level is not possible to use.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,811 views 11 18
Join discussion

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