It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

jira jql query Edited

unable to query like this api/rest/2/search?jql=project = PROJNAME AND fixVersion = "MARCH RELEASE" AND assignee (NAME)'

 

 

1 answer

1 accepted

0 votes
Answer accepted
Warren Community Leader Feb 12, 2019

Hi @Krk Rama Krishna

With the little info that you've given, the only problem I see is the syntax.

assignee (NAME) should be assignee in (NAME)  or else assignee = NAME

Hope this helps

Hi iam using rest call essentially i need based on fixedissue and projectname and assignee i tried both the things which u mentioned but iam not getting any response

 

jql=fixVersion = "#MARCH" AND project =PROJNAME AND assignee =NAME

ERRORS:

{"errorMessages":["Error in the JQL Query: The quoted string has not been completed. (line 1, character 14)"],"errors":{}}

{"errorMessages":["Error in JQL Query: Expecting either a value, list or function before the end of the query."],"errors":{}}

@Warren can u please help me with this

Warren Community Leader Feb 12, 2019

What I think you need to do is try copying everything after jql= and pasting it into the JQL filter editor within Jira, to ensure that the syntax is correct - see my example below. I think your syntax may be wrong, in terms of quotes - the editor will provide the correct quotes (if required) if you type it in manually.

Screenshot_3.jpg

It is showing perfect results in the editor

Warren Community Leader Feb 12, 2019

Okay, then try the API call without passing in any JQL (I also noticed you have rest and api the wrong way around

api/rest/2/search   should be   rest/api/2/search

Does this work? If so, there is some problem with the syntax when you combine it. Try building it up bit by bit

rest/api/2/search?jql=project = PROJNAME

then

rest/api/2/search?jql=fixVersion = "#MARCH"

then

rest/api/2/search?jql=assignee =NAME

Assuming those all work, then you can start combining them.

A further question - have you ever had any results returned via the API?

Hi @Warren 

having the same problem trying to filter Rest API results using Jira custom field but getting the below error

"

{"errorMessages":["Error in the JQL Query: The quoted string '2019/PI ' has not been completed. (line 1, character 35)"],"errors":{}}

"

https://tools.standardbank.co.za/jira/rest/api/2/search?jql=project=ard%20and%20customfield_18625=%222019/PI%20#3%22 

 

Programme Increment = customfield_18625

Jira.png

Warren Community Leader Nov 05, 2019

Hi @Mabutho Mncube 

Good result for the bokke on Saturday :-)

Your issue looks like a problem with the "/" - have you escaped it correctly?

Hi @Warren

it's correct I believe I just copied and paste it, it does return the results on jira as you could see in my screen print above.

 

question is : it is possible to filter data using customfield??

Warren Community Leader Nov 05, 2019

Hi @Mabutho Mncube 

Yes it is definitely possible to filter on customfields. I've been playing around with your string and the # seems to be causing the issue. 

For your API call, you need to change these :

  • Replace customfield_18625 with "Programme Increment" as per your screenshot.
  • Escape the # character with %23.

If that doesn't work, remove the # character and change = to ~

thanks @Warren 

you r a hero man "Escape the # character with %23" just worked fine

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

376 views 1 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you