user3845993
user3845993

Reputation: 11

JQL search on email id JIRA

How do i list the users whose email address is like @gmail.com

SQL Query equivalent to it :

select a.user_name,a.email_address from cwd_user a where a.email_address like '%@gmail.com%';

Need a JQL query similar to that, as i am trying to create a filter to list all users part of email address (@gmail.com)

Upvotes: 1

Views: 3442

Answers (1)

Scott Dudley
Scott Dudley

Reputation: 3298

The result of a JQL query is always a set of issues, not a set of users, so you cannot accomplish what you want with JQL.

If you meant that you were looking for issues whose reporter or assignee fell within a certain email domain, look at the JIRA Toolkit Plugin and the custom fields you can then add for Domain of Reporter or Domain of Assignee. You can then search those custom fields directly with JQL (after doing a reindex).

If you are truly just looking for users and not issues, but you are willing to loosen up your question from requiring JQL, you can also try the users REST API to search by substring. However, this will produce results in JSON, and it's a straight substring match against a bunch of fields, so you'll have to postprocess the results to make sure you're only getting users within a certain domain.

Upvotes: 1

Related Questions