Calling Jira Cloud API like this:
/rest/api/3/user/search?query=TC-1
gives in response all users starting with 'TC': (TC1, TC-1, TC2, TC-11, TCanything, ...), while expected result for this query would be to only return users starting with 'TC-1' (TC-1, TC-11, TC-1anything ...). It seems like hyphen '-' works as some wildcard, while it is not stated as wildcard in API documentation (link below).
I see 2 solutions:
1. Hyphen is and will stay as special character and I should escape it or use another query. How I can do that to achieve what I need? Then also API docs update would be helpful.
2. Hyphen should not be treated as special character and you can fix that behaviour on your site.
Please inform which of those two applies and help. Thank you.
I tried out this API, this is quite strange as per their own documentation there is no indication of this special character.
What I did find was though, in JQL "https://confluence.atlassian.com/jirasoftwareserver/search-syntax-for-text-fields-939938747.html#Searchsyntaxfortextfields-exactsearches" they using hyphen as a negative search, maybe the API acts the same way :-\
There was some discussion in this about wildcards : https://jira.atlassian.com/browse/JRACLOUD-29069, but no concrete output from this either.
Another thread with something similar but no concrete output https://community.developer.atlassian.com/t/get-all-jira-users-with-ap/32355
I would highly recommend raising a support ticket with Atlassian to get a response from their dev team. I've also tagged the Atlassian Support on this ticket to bring to their attention.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.