Nunjuck script get value's from JQLquery

d_van_der_vlist_mediahuis_nl
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!
February 27, 2024

Hi,

I am trying to create a script that's returns the value's of all the tickets in a JQLquery. Is this possible with Nunjuck? I've got something like this so far but it doesn't work.

 

{{ "/rest/api/2/issue/:issue" | callJira(verb=("put"), params={"issue":newIssueKey},
               body= {
                   "fields": {
                       "Hardware Assets": issue.fields.issuekey | 'project = ASSET and employee = {{ issue.fields.reporter.displayName }} and status = \"Deployed\" ORDER BY created DESC' | searchIssues(maxResults = 30)
                   }
               }
           ) }}

1 answer

0 votes
Kalyan Sattaluri
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.
February 27, 2024

Hello @d_van_der_vlist_mediahuis_nl 

 

Welcome to the forums. Not sure about your script exactly but you can directly use search API end point

https://yourdomain.net/rest/api/2/search?jql=

To try this end point,

  • Log into Jira
  • Write your JQL in Jira's issue search and verify it works.
  • Now, Open new tab in browser,
  • Complete above end point with your domain, paste your JQL beside = and hit enter
  • Once you have your rest URL verified, you can use in your script and do next steps.
d_van_der_vlist_mediahuis_nl
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!
February 27, 2024

Thanks but that's not what I am looking for.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events