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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Service Desk

Wy are we still using email for Service Desk workflows?

...attest to the experience of an urgent approval that gets lost in the boss’s inbox and requires that special “Please Approve” email or text message. In an age where we have distributed teams...

54 views 0 2
Read article

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