Forums

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

how to run an automation always on all issues within the current sprint

Nico Deufemia
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!
August 2, 2023

Hi,

I have an automation in place, which I want to be run always against all issues in the current sprint when executed. The automation then anyways filters for status and different labels, and also by the input given from the automation prompt (2 dropdowns)

Actually if there would just be a select all button/possibility in the board, then to run the manual triggered automation on all of them would solve my issue, but I couldn't find any solution besides following ones:

  • click all issues by hand holding ALT (on mac) and run the automation
  • create a scheduled automation and provide a JQL, but then there are no options for the user's entered values

The first one seems ridiculous to me, because i anyways do not understand why there is no select all anywhere. Within the backlog there is a select all for bulk editing, but no option to run an automation on the issues.
The second option is a no-op because some specific users should be able to do that several times the week - but on no fixed schedule.

How can this be achieved?

Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted
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.
August 2, 2023

Hi @Nico Deufemia -- Welcome to the Atlassian Community!

Answering the question you originally asked...

You seem to be asking about a manually triggered rule as you note a prompt with two drop-down options/fields...and to then process on the issues in the current sprint.  To do that, try a branch on JQL using the openSprints() function: https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#openSprints--

Kind regards,
Bill

Nico Deufemia
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!
August 3, 2023

Hi @Bill Sheboy 
I understand what you are saying, and now found out I can use "lookup issues" with your mentioned JQL (which I already was using in an if condition).

But how can I then add if conditions to check for the following on each issue within the {{lookupIssues}}? (i have an if block in there, but I think it requires always all issues to match the statement, but I want to apply the "then" function on each single issue which matches ALL ifs.

  • there is an if to match a label based on a userInput variable
  • another if to match a customField (single dropdown) against the second userInput variable
  • and an if to match an issue status
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.
August 3, 2023

There are a couple of ways to do that, depending on what you need:

  1. You could change your JQL to include information from the user input, status, etc. so the Lookup Issues contains what you need
  2. You could use smart value, list filtering and conditional logic: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588  https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

If you want to filter on the user inputs from the trigger, method #1 is needed. 

Method #2 will not work, because once you are inside of an iterator for lookup issues, nothing else is visible...from outside of the lookup issues result.

And so this will not currently work:

{{#lookupIssues}}{{#if(equals(labels, userInputs.varMyTestLabel))}} this issues matches for my tests {{key}}{{/}}{{/}}

The userInputs are not part of the lookup result's issues, and so are not visible inside.

Like Nico Deufemia likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events