Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using the {{lookupIssues}} to find number of issues in an Epic

Really excited about the new Jira Work Management tool, and I am doing a POC for our professional services team to manage various projects with external customers by this team. 

 

I am looking for a way to automate a status change based on the number of "Risks" that have been identified. 

I have an epic for each project that is being worked on. If a risk is identified within that project, a ticket with issuetype = Risk will be created within the epic. 

 

I would like to automate the status change of the Epic, if there are 2 or more tickets (with issuetype = risk)

I have setup the following logic to try and return the number of risks within an epic, but it is currently not returning a value. I suspect because the lookup is inside of the (issue in epic)

 

Additionally, even the "{lookupIssues.size}}" within the branch is returning the total count, and not the count per epic

 

Automation rules - JIRA 2021-04-30 16-40-49.png

 

1 answer

1 accepted

2 votes
Answer accepted

Hi @Jeffrey Bistrong 

I think you are close, and just need a few adjustments.  A scheduled rule with JQL runs the steps after the trigger for each issue found, so it may be getting a bit of collision on the issues to check.

How about something like this below...  Please check the names of projects and issue types to confirm what I read from your image.

  • Trigger: scheduled every day with JQL of project = PS AND issueType = epic
  • Action: Lookup Issues on JQL of "epic link" = {{issue.key}} and issueType = risk
  • Advanced Compare Condition: {{lookupIssues.size|0}} is greater than or equal to 2
  • Action: do what you need, comment, log, transition the epic, etc.

 

Best regards,

Bill

Thanks bill, that looks good. I did end up figuring it out a little bit after i posted this, but I left it up here to see what would be posted. 

 

This is the solution I came up with which looks similar to what you did here except for the "size|0" part. Thanks a bunch!

Automation rules - JIRA 2021-04-30 18-56-27.png

Like Bill Sheboy likes this

Hi, Jeffrey.  I am glad to learn you got it working.

The "size|0" adds a default value of zero when no issues match the JQL for the lookup.  I have seen problems where this can collapse to null, and so cause issues in rules.  So I add it for a bit of "belt and suspenders" insurance.  :^)

__Bill

Like Jeffrey Bistrong likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Management

JSM June ask me anything (AMA)

Hello Community members! We’re wrapping up the end of JSM June with an Ask Me Anything (AMA) with the Jira Service Management product team. This is your chance to ask all your ITSM questions to o...

262 views 13 14
View question

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you