Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,816
Community Members
 
Community Events
168
Community Groups

Jira API v3 JQL search assignee & date range

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

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}`,

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

Like # people like this
0 votes

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 Community Leader Aug 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

Atlassian Community Events