Is there a way to iterate through list via smart value

Damla Naz Yilmaz June 25, 2021

Is there a way to iterate through list which I get from a Webrequest?

 

Use Case:

I get a list from a webrequest which I make via Automation. And I want to save every single value in different Customdields, Is there a way to do it?

 

 

2 answers

0 votes
Sarah Kladstrup August 22, 2022

Would something like this help? https://community.atlassian.com/t5/Jira-Software-questions/Using-variables-in-functions-in-smart-values-in-JIRA-for/qaq-p/1630769 they mention adding separator characters to display the list items nicely.

0 votes
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.
June 25, 2021

Hi @Damla Naz Yilmaz 

No; I do not believe there is a generic iterator/looping structure in automation rules yet.  Here is one suggestion to add that feature: https://jira.atlassian.com/browse/JRACLOUD-76906

If you know the list of custom fields, you could include each one as an edit in the rule, and then repeatedly parse the response message with text functions and regular expressions.

A more risky alternative would be to create a "queue" field, and use a second rule which repeatedly triggers itself to consume the values, and halts when the field becomes empty.  Given automation rules already have observable race-track timing issues (sometimes) I would strongly advise against that...and, there is no guarantee that the built-in runaway prevention wouldn't halt the rule defensively.

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer