Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Scripted Paragraph field to return results based on JQL

Priyanka Agrawal February 23, 2025

I am looking for a script to display all the issues returned by the below JQL in a scripted paragraph field and, if possible, the result should be rendered inside the "Jira issues" macro.

 

JQL:

project = TRAV AND 'Account ID' ~ "${accountId}"

 

Here, 

"${accountId}" is the account ID of the current issue where the scripted field is present.

Please help me with this.

1 answer

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 24, 2025

Hi Priyanka,

You won't be able to do that with a simple JQL query. You might can get what you want by creating an automation rule using lookupIssues functionality and update the paragraph field with the list of issues returned from the lookupIssues. 

 

Priyanka Agrawal March 3, 2025

Thanks @John Funk ,

The solution partially works. It fetches data using lookupIssues. But I don't know how would that work when there are more than 5000 issues fetched by the lookupIssues. Also, do you know how to present the result in a tabular format using automation in the paragraph field?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
yesterday at 4:20 PM

You would definitely need to filter down the results of the lookupIssues. And sorry, I don't have experience with the tabular format. 

@Bill Sheboy 

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.
yesterday at 4:55 PM

Hi @Priyanka Agrawal and @John Funk 

For the table, you could use the markdown inside the iteration of the lookup results:

https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=tables 

 

Regarding the issue limits, Lookup Issues can return up to 100 issues to a rule. 

The new issue search REST API endpoint can return up to 5000 issue ID values, but as soon as any field other than ID or Key are included in the results, the limit drops back down to 100 issues, requiring paging.  And so there is no workaround for an automation rule.

 

Kind regards,
Bill

Like • 2 people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian community, university, on demand, transition to jira cloud

Transition to Jira Cloud

Switch to Jira Cloud with Atlassian University! Explore new navigation, issue views, and Cloud features like team-managed projects and automation. Tailored for Data Center users & admins, these courses ensure a smooth transition. Start your journey today!

Enroll now
AUG Leaders

Upcoming Jira Events