Forums

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

How to pass Dynamic variable in JQL

dharm dutt September 26, 2023

Hi, need to pass dynamic variable in JQL

item="ABC-01"

https://jira.com/rest/api/2/search?jql=key='$item'%20ORDER%20BY%20duedate%20ASC&fields=id,key&maxResults=100"
I get error saying $ is reserved word

1 answer

1 vote
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.
September 26, 2023

Hi @dharm dutt 

You do not indicate how you are trying to do this: in some script / program, in an automation for Jira rule, in a spreadsheet, etc.

Perhaps use whatever concatenation functions exist in your environment to build the URL first and then us it for the REST API call.

Kind regards,
Bill

dharm dutt September 27, 2023

Thank you. Your suggestion helped me to resolve the isue

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events