Hi everyone,
I'm unable to build a query which gives me results to a certain (HR) project only. If I send this query to the API:
rest/api/2/search?jql=summary~"SUMMARY"&fields=id,key
Then I receive tickets for multiple projects, so I'm trying to add the project=HR as a filter, but the queries I've built so far do not provide me with the expected results and HRS related tickets are also part of the output.
What I'm receiving now is:
Can someone help?
This
rest/api/2/search?jql=project=HR AND summary~"SUMMARY"&fields=id,key
should work, if your project key is HR.
If it doesn't work, try project=HR AND summary~"SUMMARY" in the Jira query filter, which will tell you if the jql part is working. For example I get
because the project HR doesn't exist in my Jira instance.
I've just enlarged your screenshot and noticed you're getting issues from HR and HRS.
Again in the Jira query filter box, if you start typing project=hum it should show the two projects and you need to use the full project name, not the key. So it would be project="Human Resources" or whatever the full project name is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys,
I tested this one and it works:
/rest/api/2/search?jql=project=HR%20AND%20summary~"SUMMARY"&fields=key
It works with or without using "%20" for replacing whitespaces in the query, what is the recommended way of replacing whitespaces?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't replace them at all, I've always just left the spaces there without a problem, but as you say, the %20 should also work, just more difficult to read
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.