Forums

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

jira rest api search for unassigned tickets (JS)

MARY WALLER
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 25, 2022

Hi,

 

when searching for unassigned tickets in JS using:

const res = await httpClient.get(
`${jiraUrl}/search?jql=project=TMAFTO&assignee%20is%20EMPTY&maxResults=20&issuetype=incident&status=open`);
it always returns the last 'maxResults' tickets created.
I've tried every combination of url encoding, quotes, etc, but always the same, whatever number I use for 'maxResults' is the number of tickets returned - open or closed, assigned or not.

What I want is the rest equivalent of this JQL (which works):

project = TMAFTO AND issuetype = "incident" AND status = Open AND assignee is EMPTY
TIA for any enlightenment!

1 answer

1 accepted

2 votes
Answer accepted
Mohamed Benziane
Community Champion
July 26, 2022

Hi,

Can you try this:

search?jql=project=TMAFTO%20and%20assignee%20is%20EMPTY%20and%20issuetype=incident%20and%20status=open&maxResults=20
MARY WALLER
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2022

fantastic - that works!
I'd tried %26 instead of & but that didn't.

Thank you so much :)

Suggest an answer

Log in or Sign up to answer