The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Jira Automation - Iterating over a list and replacing values

Remy
September 12, 2024

Hi all,

I am basically working on an automation where a have a bunch of plain text names from a multiselect (we'll say for examples sake a, b, c) that I need to replace with IDs (we'll say x, y and z) to send via web request to a different service.

I have a, b and c in a list and their corresponding IDs in a lookup table with x, y, and z 

my gut response would be to build a string variable using the for each loop to then pass through to the web request. I have a create variable action inside the for each referring to itself for this purpose

The problem I am having is I only seem to get the last value back, ie I only get z back instead of x, y, z

Adding a log action to the loop shows it logging x, y, and z separately instead of the expected x, x,y x,y,z

Is there a way of doing this?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Trudy P Claspill
Community Champion
September 12, 2024

Hello @Remy 

When asking for help with an Automation Rule it will enable us to help you more effectively is you provide screen images of your entire rule, each step in the rule, and the output to the rule execution audit log from when the rule runs.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events