Our project uses multiple components on epics, features, stories, and tasks. I am trying to create a JIRA automation rule to copy one specific component to a child issue when created or epic link is edited.
I am able to create the rule to copy all components from the epic based on the epic link - values changed trigger, but the use case I have is to copy one specific component out of many.
Looking forward to the assistance!
Hi @Cayce McCraw -- Welcome to the Atlassian Community!
When adding (or removing) a specific Component value, please use the advanced edit features with a JSON expression: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Components
In that documentation, also see the examples for the Labels field to see how to add a value using the "update" attribute.
If this does not help, please post the following for context:
Kind regards,
Bill
Thank you for helping me! I've entered the JSON based on documentation above, however, I am receiving errors saying JSON is not valid.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, you are using Jira Server / Data Center, and so the JSON documentation for that version may be found here: https://confluence.atlassian.com/automation/advanced-field-editing-using-json-993924663.html
Next, please read the JSON documentation carefully, and note I also described looking at the Labels field for an example to use the "update" attribute.
As an example for the Components field, that would be this for the values you show:
{
"update": {
"components": [
{ "add": { "name": "FPS O&M" } },
{ "add": { "name": "FPS Program" } }
]
}
}
Also note well: in the Edit Issue action, you have selected the Components field from the dropdown list AND used JSON. Only one of those can be used at a time for the same rule action for a single field. De-select the field from the dropdown list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the quick response - I was able to successfully use the above to add both components, however, my initial question may not have been clear. I need to "copy down" or "add" either "FPS O&M" or "FPS Program" components depending on which component the Epic has - the epic would have one or the other, but not both. The epic could also have additional components such as multiple team names/components, so a straight copy of all components down to the story or task level wouldn't work either as stories and tasks would be worked by different teams.
I really do appreciate your time, and hopefully this clarification will help get us closer to resolving my dilemma!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Cayce McCraw ,
Welcome to Atlassian community!
You could try something like this:
Let me know if it works for your scenario.
Bests!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case you want to look at the Advanced Editing features. You need to append your value to the existing components in the child. Then, using the advanced editing you can update the components to have the existing components and the new components
{
"fields": {
"components" : [ {{AllComponents}} ]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.