JIRA REST API: How to search groups by case insensitive value

Hello, everyone

How can I ignore case sensitiveness of query parameter during getting groups with the help /rest/api/2/groups/picker?

Right now:
/rest/api/2/groups/picker?query=aaa returns group Test aaa.
/rest/api/2/groups/picker?query=aAa returns group Test aAa.

What I need is - get both groups (Test aaa and Test aAa ) using rest/api/2/groups/picker?query=aaa or rest/api/2/groups/picker?query=AAA

Thanks.

1 answer

0 vote

Hi Natalia,

One thing you can do is change the = to a ~ which performs a fuzzy search.  If I search with the = sign I get one result:

{"header":"Showing 1 of 1 matching groups","total":1,"groups":[{"name":"aaa","html":"<b>aaa</b>","labels":[]}]}

When I use the tilde I get multiple results:

{"header":"Showing 3 of 3 matching groups","total":3,
"groups":[{"name":"aaa","html":"aaa","labels":[]},
{"name":"jira-administrators","html":
"jira-administrators","labels":
[{"text":"Admin","title":"Users added to this group will be given administrative access","type":"ADMIN"},
{"text":"JIRA Software","title":"Users added to this group will be given access to <strong>JIRA Software</strong>","type":"SINGLE"}]},
{"name":"jira-software-users","html":"jira-software-users","labels":
[{"text":"JIRA Software","title":"Users added to this group will be given access to <strong>JIRA Software</strong>","type":"SINGLE"}]}]}

For more information about searching in JIRA see the Search syntax for text fields knowledge base article.

Cheers,

Branden

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

3,312 views 14 20
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