Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira API v3 JQL search assignee & date range

Isabelle Bolt August 18, 2022

Hello, 

I would like to use JQL to search for issues by assignee, and date range to the past month. I can get issues by assignee like so:

https://{{JIRA BASE URL}}.atlassian.net/rest/api/3/search?jql=assignee=123445678

 

But how do I get issues by date as well? The second parameter is ignored in my query string. I'm using postman to test my API calls: 

 

https://{{JIRA BASE URL }}.atlassian.net/rest/api/3/search?jql=assignee=123455768789&jq=from=2022-01-01&jql=to=2022-01-08

 

I would usually just use the "&" character to add an extra query value but I'm not seeing any change.. I'm just a bit confused about how to add any additional parameters to my searches using JQL, past the first param.

Any help on this is much appreciated !

3 answers

0 votes
Isabelle Bolt August 19, 2022

Hi @Carlos Faddul  and @Bill Sheboy , 

So this resource https://confluence.atlassian.com/jirasoftwareserver/advanced-searching-939938733.html points me to advanced issue searching. I am on Jira Software - where can I find this advanced issue searching page? This will be useful for my future searches. 

Screenshot 2022-08-19 at 09.46.12.png

 

I found my answer using:

url: `${process.env.JIRA_SITE_URL}/rest/api/3/search?maxResults=2000&startAt=0&jql=worklogDate>startOfMonth()+and+assignee=${assignee}`,
Trudy Claspill
Community Champion
August 19, 2022

Click on the Filters menu. The last item in that pop up is "Advanced issue searching".

Like # people like this
0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2022

Hi @Isabelle Bolt -- Welcome to the Atlassian Community!

You appear to have some syntax errors in your JQL.  I recommend initially creating your query with advanced issue search in Jira, and then grab the expression from the browser URL to use in your REST API call.

Kind regards,
Bill

0 votes
Carlos Faddul
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2022

Hi @Isabelle Bolt are you already use the Parse JQL query this maybe can you help you more.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events