Hi there
I have several automation rules that used advanced branching to create multiple issues based on unique values (labels on a triggering issue)
branch looks like:
Smart Value
{{#issue.Labels}}{{.}}, {{/}}
Variable Name
UniqueIssue
for each issue that I create (so each UniqueIssue) I'd like to be able to take the position of the label being iterated on (the respective Label) and add it as a label to the newly issue giving me labels of 0 1 2 etc on each respective issue. I've been unable to find a way to get just one index label on each issue instead of all 3 of them (ie separate labels of 0 1 and 2). Any suggestions?
ideal output from the would be three issues
UniqueIssue1 with a label of 0
UniqueIssue2 with a label of 1
UniqueIssue3 with a label of 2
Tried using something like this in advanced edit but it gives me 3 labels per issue
{
"update": {
"labels": [{{#issue.Labels}}{"add": "{{index}}"},{{/}}
}
}
Even just getting the "0" label on the first issue created through the loop would actually be the best case scenario.