Hello,
I recently asked a question around how to manage a Checkbox custom field in a Parent issue, based on looping through all sub-tasks. See question here I am now looking to do the same thing but on Jira Cloud using the inbuilt Automation feature.
For background;
Whenever the Delivery Team field is updated in the sub-task I want this to trigger a rule for the "Delivery Team(s) field in the Parent to be first cleared and then add back in the equivalent options held by each sub-task.
Is it possible to do this with Automation?
I have tried to do something like the following;
I was hoping I could reference the parent field and set it with the sub-task value.. but clearly that doesn't work. Is there anything else that could be done to achieve my goal?
Many thanks in advance
I managed to figure it out, with a slight change of direction and using a JSON function.
So, rather than looping through the sub-tasks as a branch, instead I trigger the automation when a given sub-task is updated / deleted and then use the Parent branch. In this branch I use a JSON function to turn all of the sub-task values for a given field (in my case "Delivery Team") into an array.
This then gets fed into the Parent's field (which I reference using the custom field id, to avoid issues down the road with any field name changes).... and it seems to do the trick!
{
"fields": {
"customfield_100XX" : {{issue.subtasks.Delivery Team.asJsonObjectArray("value")}}
}
}
Screenshot:
Hi Anthony,
Not sure this helps much, but I would question the use of the word fields in the advanced section for {{triggerIssue.fields.customfield
Why not just {{triggerIssue.customfield
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk thanks for responding. I think I tried both, but ultimately I don't believe you can use a 'smart value' in that particular section - the fields must be explicitly named.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.