Forums

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

Lookupissues to get specific number of issues

Sidharth verma September 12, 2024

 

 

Hi,

I want to get a specific number of JQL issues from the lookupissues Object list that is returned. I understand that we have 

{{lookupissues.get(index)}} which can give us a specific object in the list.

 

can i pass a variable in place of an index so that I can fetch the value from somewhere and depending on that value it should return me (0 to Index) number of issues. my goal is to get a specific number of issues from a JQL and the number of issues should also come from a variable. looking forward to hearing from you all. 

do let me know if i need to further clarify 

2 answers

0 votes
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 12, 2024

Hi @Sidharth verma 

With the Lookup Issues action, there is no way to dynamically access a specific number of issues.  

One alternative is to use the REST API if your number of issues is 100 issues or fewer:

If you want to try this approach, here is a how-to article for calling the REST API from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

Kind regards,
Bill

0 votes
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 12, 2024

Hi @Sidharth verma 

 

Did you try to create variable in Create variable action and use it later in rule?

 

Regards,
Seba

Sidharth verma September 12, 2024

Hi @Sebastian Krzewiński

 

Yes, i tried but its giving me the below error:

 

Failed to get value for lookupIssues.get({{nfreePackagers.asNumber: {{lookupIssues.get({{nfreePackagers.asNumber}}).key}}

 

I get the same error when i try without converting it to number format as well:

 

Failed to get value for lookupIssues.get({{nfreePackagers.asNumber: {{lookupIssues.get({{nfreePackagers}})}}

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events