Im sure this is a bug but cant find where to log it.
The scenario I'm trying to create is to copy all labels matching "AssetMaintenance_*" from an Epic to it's child issues.
If I loop on children issues then
Edit Issue fields - advanced field editing
it works
{
"update": {
"labels": [{{#issue.parent.labels.match("(AssetMaintenance_[^,]*)")}}{"add": "{{.}}"}{{^last}},{{/}}{{/}}]
}
}
However if I use the same statement and assign it to a variable it fails
Create variable
parentLabelList = issue.labels.match("(AssetMaintenance_[^,]*)")
Then loop on children issues then
Edit Issue fields - advanced field editing
it fails
{
"update": {
"labels": [{{#parentLabelList}}{"add": "{{.}}"}{{^last}},{{/}}{{/}}]
}
}
ERROR: Error while parsing additional fields. Not valid JSON.
the problem is I have to do an if condition and copy and paste the logic to check the count before looping. So I have to copy the complex regex twice 