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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,508
Community Members
 
Community Events
184
Community Groups

How do you limit Jira Automation LookupIssues results?

I'm creating an automation that uses the LookupIssues field. I use the data from the lookupIssue field and push it all into in an "edit comment on issue" block. 

 

Right now, I'm seeing results of 100 tickets at time. Is there a way to limit these to 10 results?

2 answers

1 accepted

2 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

Hi @Aqib_Shirwani 

LookupIssues component may return a maximum of 100 issues (https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Automationactions-Lookupissues). Since the {{lookupIssues}} smart value is considered to be a list, you can use any of the list methods found here https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/

Limiting is going to be tricky. The .get(index) method would give you the first item from the list.

That's exactly what I needed! Thank you @Alex Koxaras _Relational_ 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

@Aqib_Shirwani good to know that!

Glad to be of help! Kindly mark my answer as accepted in order to help others in the community with the same question. Much appreciated! :)

Like Aqib_Shirwani likes this

Hi @Alex Koxaras _Relational_ , I have the opposite problem, I need list more of 100 result, Is possible increase this limit o use other method?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2023

@AaronP not any that I'm aware of. You have to narrow down your search

Thanks for you response Alex.

But what a disappointment :(
As you well pointed out is possible create a limit, but that this variable have a limit so low is totally irrational.
I hope that Atlassian increase this limit or remove completally.

Hello everyone,
Just to comment that opening a case in atlassian to extend this limit, they have told me that at the moment they have no intention of doing so, but that this incident exists: https://jira.atlassian.com/browse/JSDCLOUD-11414
If the necessary votes are added they will implement it.

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.
Apr 24, 2023 • edited

Hi @Aqib_Shirwani 

There are a couple of things to help with this, but unfortunately they cannot be used together: {{index}} for a list and smart value, list filtering.

The work-around is to call lookup issues twice, and filter the list the second time:

  • action: lookup issues, with JQL which has an ORDER BY statement for your desired order.  Let's assume it is by Key.
    • project = myProjectName ORDER BY key
  • action: create a variable to save the key of the 10th item in the list, using the zero-based index
    • variable name: varTenth
    • smart value: {{lookupIssues.get(9).key}}
  • action: lookup issues, with JQL which has an ORDER BY statement for your desired order, and this time add the variable
    • project = myProjectName AND key <= {{varTenth}} ORDER BY key
  • ...your lookup results now only contain the first 10 issues

 

Kind regards,
Bill

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

That's a nice workaround @Bill Sheboy ! I've tried to insert a list as a smart variable and split it in order to get its size, and then pass the individual items within the {{lookupIssues.get(index)}} smart value, but unfortunately it doesn't work like this. Even with the solution I provided, a lookupissue of 100 results takes about 10 secs. And if @Aqib_Shirwani is running all the time this rule, then he will hit the service limits in no time.

Like Sunil Racha likes this
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.
Apr 24, 2023

Interesting...I tested mine on a large project, and it took 5-7 seconds for a both calls to lookup issues: the first is 100 issues and the second is 10.

Slight detour from this question: At this time, created variables do not preserve object typing...but...Lookup Tables do.  I experimented with this and found a lookup issues result could be stored in a lookup table, entry value, and de-referenced later as lists, issue fields, etc.  You may want to try that for your earlier use case/scenario.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

@Bill Sheboy 

About my instance and the 100 lookupissues:

100 issues lookup.png

I'm on a standard plan, and I don't know if the performance is lower than that of another plan e.g. premium. I support not, but you never know!

Concerning the lookup table, I'll try to experiment with that! Thanx for the info!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events