Forums

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

I can't edit issues after using "Lookup" and "For each"

Brian Chen January 16, 2025

Hi all,

I'm trying to combine Lookup and For each to update test items that have been delayed for five days.

I'm a bit confused about why I'm getting component incompatibility errors. Would anyone be able to provide some guidance? I would really appreciate any help.

Thank you in advance!

Screenshot 2025-01-17 at 11.15.27 AM.png

 

This is what I do in advanced branch:

Screenshot 2025-01-17 at 11.25.52 AM.png

There is two issues found when Lookup issues:

Screenshot 2025-01-17 at 11.27.19 AM.png

2 answers

2 votes
Trudy Claspill
Community Champion
January 16, 2025

Hello @Brian Chen 

Instead of using a Lookup Issues and a Branch, use just a branch of type For Related Issues JQL. Use the JQL that you currently have in the Lookup Issues action.

Why did you choose the settings that you have chosen in your Advanced Branch? If you can tell us that we can try to explain the flaw in your choice.

Brian Chen January 16, 2025

Hi @Trudy Claspill ,

I used the wrong account to reply your answer. The account above is me.

Trudy Claspill
Community Champion
January 17, 2025

Hello @Brian Chen 

Thank you for the additional information.

Have you availed yourself of the free, on-demand training available at https://university.atlassian.com concerning Automation rules?

You would use Advanced Branching to iterate over a list based on some criteria, when you can't get that list through the other Branching options available.

There's a couple of ways that you could accomplish this in a Scheduled rule. One is very similar to what you showed in your other reply.

Instead of using an Advanced Branch use FOR EACH: Branch rule/Related Issues: JQL.

For the JQL use key in {{lookupIssues}}

That will loop over each issue in the results set from the Lookup Issues action.

Within the branch add the actions to Edit Issue (set the Priority) and Send Email (With Assignee as the recipient.).

Outside of the branch use a Send Email action. In the final email action you can use syntax like this to list the key for each issue found in the Lookup Issues action:

{{#lookupIssues}}
  {{key}}
{{/}}

0 votes
Brianchen
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!
January 16, 2025

Hi @Trudy Claspill,
 
Thanks for your advice.

I used the method you suggested to update the issues, and it worked. Initially, I tried to use Lookup Issues and a Branch because I wanted to achieve two tasks in a single automation rule:

  1. Automatically adjust the priority to High and notify the test assignee.
  2. Automatically generate a delay list and notify the project manager.

The truth is, I don’t fully understand how to use the Advanced Branch properly.

This is a logic flowchart that I thought would work.

Screenshot 2025-01-17 at 3.38.54 PM.png

 

Suggest an answer

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

Atlassian Community Events