Hello Jira-automation colleagues,
We are using Jira DC 8.13.x version with automation for Jira.
For each value in the Fix Version field, we want to create Sub task.
Unfortunately, Jira DC does not have the 'For:each' option, so we were trying to use list of numbers conditions as per https://confluence.atlassian.com/automation/using-conditional-logic-in-smart-values-1081351607.html, however without success.
We tried to work with 2 rules:
Rule "1":
Trigger: When fixversion is updated, we copy these values to a custom field "tempversion".
Rule "2" (it can be called by other rules):
Trigger: When "tempversion" is updated. It will:
- create a sub-task with the first value of "tempversion"
{
"fields": {
"fixVersions": [ { "name": {{issue.tempversion.first.name.asJsonString}} } ]
}
}
- update "tempversion" field removing the first value.
{
"fields": {
"tempversion" : [ {{#issue.tempversion}}{{^first}}{"name": "{{name}}"} {{^last}},{{/}}{{/}}{{/}} ]
}
}
It does work... but... it is creating 2 sub-tasks for each version.
Any thoughts on this?