Forums

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

Inconsistent result in Jira API

Vimalraj
Contributor
September 3, 2024

When I use below API, I get below error,

https://localhost.jira.com/rest/api/2/search?&fields=reporter,status,summary&issuetype=Change&jql=("'Program Name'=Test")&maxResults=1000

{"errorMessages":["Error in the JQL Query: Expecting operator but got ')'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 23)"],"errors":{}}

 

When I use below API, I get all other records except "Change" records

https://localhost.jira.com/rest/api/2/search?&fields=reporter,status,summary&&issuetype=Change&jql:("'Program Name'=Test")&maxResults=1000

May I know what is wrong with the api?

Thanks

 

2 answers

1 accepted

0 votes
Answer accepted
Marc - Devoteam
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.
September 3, 2024

HI @Vimalraj 

I think your call is not correct.

I assume you want to see all issue with type change and the changes have a field program name set with value test and you want to show the fields:

reporter, status and summary

Am i correct?

The the call should be: https://localhost.jira.com/rest/api/2/search?jql="Program Name"=Test and type=change&fields=reporter,status,summary

Vimalraj
Contributor
September 4, 2024

@Marc - Devoteam Thanks for your response. Could you pls check on the above issue?

Marc - Devoteam
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.
September 5, 2024
0 votes
Fabio Racobaldo _Herzum_
Community Champion
September 3, 2024
Vimalraj
Contributor
September 4, 2024 edited

Thanks @Fabio Racobaldo _Herzum_ . It returns with value even for other program names and not just "Test". Also, If I include status like below

https://localhost.jira.com/rest/api/2/search?fields=reporter,status,summary&jql=issuetype=Change%20AND%20%27Program%20Name%27=Test&status=%27In%20backlog%27&maxResults=1000

It returns with all status and not just "In Backlog". Pls assist.

Thanks

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.11
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events