Hello there!
How do I add a component to a ticket using automation, not override the existing values?
Im creating an automation that needs to ADD a component when tickets are created in a project. The problem I'm running into is this is overriding any other components that may have been manually added during creation or already there from a recurring ticket.
I've seen some threads referencing some sort of JSON code or something... but most of these posts seem to assume that you have some knowledge of coding/computer stuff. As you can probably see, I do not have this kind of in-depth experience.
I found an article that says you can just add "copy from issue" - but this is from 2021 and this no longer appears to be an option at the moment.
Would somebody be able to explain exactly what I would need to change with my automation in order to achieve this? So fat, its a pretty basic build:
That article you linked to is for Jira Server/Data Center, and you appear to be using Jira Cloud. Is that correct?
If so...you can still use the advanced edit with JSON described in the article. Here is another article specifically for Jira Cloud on using JSON for edits.
To do that...
{
"update": {
"components": [{
"add": {"name": "name of your new component"}
}]
}
}
You can also enter a smart value, if that is the source of your component name.
Kind regards,
Bill
@Bill Sheboy Thanks so much, Bill! I didn't even realize the article was for the server and not the cloud.
But your answer is amazingly helpful! This is all I was looking for and I've been in and out of so many different rabbit holes that I feel like I was running in blind circles. Haha. Thank you SO much for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For those looking for an answer to my second question (which is down below) about how to add 2 components, I have the correct JSON code format, courtesy of Atlassian Support chat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
deleting duplicate post
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Another quick question for you (if you don't mind)...
How would you format the JSON if you want to add an additional second component?
I'm realizing that my rule would run better with if/else conditions, so I'm trying to set up my "Else" to add two components if the field is empty. But all of my attempts have yielded some sort of "parsing error" so clearly I'm missing something
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tina, would you please post what you have tried thus far for that case? I believe this is possible with conditional smart values...the trick may be getting the correct conditions so the item before has a trailing comma.
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.