So I'm trying to do something such as look up an account that has the exact summary of "chihuahua", and my URL so far looks like http://jiraexample.com/rest/api/2/search?jql=project=ACCT&summary~chihuahua
I'm getting a list of a lot of results, when there should only be 1 exact match. Even surrounding the chihuahua in quotes doesn't work.
Community moderators have prevented the ability to post new answers.
I think the problem might be the "&" in your URL. (And maybe also the "="s.) If those characters are not properly escaped, they are treated literally, and in URLs that means as parameter separators. If that is the case, than the parameters in your URLhttp://jiraexample.com/rest/api/2/search?jql=project=ACCT&summary~chihuahua
are parsed like so:
jql
project=ACCT
summary~chihuahua
null
(no value)So, effectively, your finding all issues in the project "ACCT".
Solution:
Use " AND
" instead of "&
" in your JQL query:
http://jiraexample.com/rest/api/2/search?jql=project=ACCT%20AND%20summary~chihuahua
If you need exact summary match, use "=" instead of "~":
http://jiraexample.com/rest/api/2/search?jql=project=ACCT&summary=chihuahua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"=" is not a valid operator for the standard text fields, including summary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dickson,
Thank you for your question.
You could narrow the search result down by adding extra parameters to the search:
# [JIRA-BASE-URL], i.e.: http://my.jira.dns # [PROJECT-KEY], i.e.: ABC # [USERNAME], i.e.: myuser [JIRA-BASE-URL]/rest/api/2/search?jql=project=[PROJECT-KEY]&summary=[USERNAME]&fields=description
Please, refer to http://example.com:8080/jira/rest/api/2/search [GET, POST] for further information.
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Extra parameters shouldn't be needed, if I only have one account that has a summary of "chihuahua" shouldn't I be able to get that one result just based on an exact summary match?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you attach a screenshot from your page summary, please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.