Hi,
I need to copy component/s from Phase(Parent) to the Epic(Child) in Automation when the Epic is created.
Thank you.
Velizar
PS
It is not the same as copying the component from a Parent/Epic to Child tickets/Issues in Epic
Hi @Velizar_Velizarov ,
Welcome to the community!
Are you on Cloud or DC (you tagged both and automation works a little different on both platforms)
Cheers,
Tessa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Velizar_Velizarov Welcome to the Atlassian Community
You would need to use the JSON part of the automation to update the component/s field (which holds an array of strings). You can find documentation on this:
automation/docs/advanced-field-editing-using-json/
Kind regards,
Dick
addendum The above is for both cloud and datacenter solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you give me an example that is connected to my question?
BR
Velizar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
"update": {
"components": [{
"add": {"name": {{Domain.asJsonString}}}
}]
}
}
In this example, Domain was defined as a variable using Create Variable in Automation.
This should also work with "somethinglikethis"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The quoted documentation holds one really big piece of code with the Supported fields & Operators. There you can read on lines 39 to 52 that there are in fact three operators available for the components field: add, set and remove.
Hope to have given you a fishing rod instead of a fish
:)
Dick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Velizar_Velizarov
Could you mark this as an answer, so that others with a similar problem can find it easier please?
Thanks a bunch,
Dick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, I will do it, but first, I want to check it. I think this is only one part of my question. The real problem is that I can't get the Phase(Parent) Component/s and set it to Epic(Child) in automation. Or if I bring them to a different branch, I can't go back and add them to the Epic(Child) even with Variable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First step would be to share your current automation with this community then.
It should be triggered by on create (or with an extra automation on field change, depending on your helpfulness to your users). Followed by making sure it's an epic you're working on by the conditional issuetype = epic. Then the action would be to lookup the phase issue using the parent link of the epic. Then securing the components of the phase (use a logged variable to have some feedback on how the automation is working for you), followed by editing the components field of the triggerissue.
the floor is yours...
Dick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you need the complete array of components to be copied over, the JSON code would be like:
{ "fields": { "components": {{issue.parent.components.asJsonStringArray}} } }
Where fields is a shortcut for calling update with the set operation.
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.