Hi everyone,
I'm trying to create a Jira Automation rule that automatically copies an Assets/Object field from a parent issue to a newly created sub-task.
Setup
customfield_12975Goal Whenever a sub-task is created, the value of the Customer Asset field on the parent should automatically be inherited by the sub-task.
Hope this helps!
Automation set up:
Note: Please make sure the Assets/Object field is available on sub-tasks field configuration
If the sub-tasks are created by an automation, make sure to enable "Check to allow other flow actions to trigger this flow. Only enable this if you need this flow to execute in response to another flow" setting under flow details
Hi! @Gerda De Lima ,
This is one way to achieve it:
key= {{issue.parent.customfield_12975}}key= {{issue.parent.customfield_12975}}key= prefix: This is the correct syntax for Assets/Object fields in Jira Automation. It tells the rule to look up the object by its key. {{issue.parent}} is only populated when the sub-task has a parent at creation time. If sub-tasks can be created without a parent, you may want to add an additional condition to check that the parent exists.In this example i use the assets field "customfield_10131"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lalithesh Channu & @Cristian Quiroz Garcia - NTT DATA ,
Thanks for the quick response!
Have you had a chance to try this with Assets fields? It seems that the Edit Work Item Field action is not able to update an Assets/Object field.
I'd be happy to hear about your experience or if you've found a workaround.
Best regards,
Gerda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes @Gerda De Lima
The field I've used in my automation rule is an Assets/object custom field
P.S. Please make sure the Assets/Object field is available on sub-tasks field configuration
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gerda De Lima Yes — the example I shared does use an Assets/Object field.
The trick is passing the value with the key= prefix in the Edit Work Item Field action:
key= {{issue.parent.customfield_12975}}This lets the automation resolve the Assets object by key and assign it correctly. Without key=, the field won't update.
Hope that clears it up!
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.