Getting the user domain in JQL

Susanne Harelius [Riada]
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.
May 29, 2014

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

1 vote
Norman Abramovitz
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.
June 2, 2014

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

Susanne Harelius [Riada]
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.
June 2, 2014

Cool, thanks I will have a look at that!

Norman Abramovitz
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.
June 2, 2014

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

0 votes
Nadir MEZIANI
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.
June 2, 2014

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.

Susanne Harelius [Riada]
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.
June 3, 2014

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.

0 votes
Mehmet Kazgan
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.
June 1, 2014

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

Susanne Harelius [Riada]
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.
June 2, 2014

Thanks! I will look into that possibility.

0 votes
Mehmet Kazgan
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.
May 29, 2014

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

Susanne Harelius [Riada]
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.
June 1, 2014

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).

Suggest an answer

Log in or Sign up to answer