I’m working with two sets of data, Story 1 and Story 2. In Story 1, I have an array that contains around 6 to 7 labels. My task is to fetch these labels and then append them to Story 2. If I run into any issues, like errors or unexpected outcomes, I’ll need to provide more details to get help with resolving them.
Hi @Devashish Kedar -- Welcome to the Atlassian Community!
Rather than branching to add the labels, I recommend using list iteration to add all of them in on edit issue action with advanced edit with a JSON, update.
For example:
{
"update": {
"labels": [
{{#lookupIssues.first.labels}}
{ "add": "{{.}}" }{{^last}}, {{/}}
{{/}}
]
}
}
Kind regards,
Bill
Hi @Devashish Kedar & welcome to the community,
In your rule I don't see where you make a distinction between story 1 and story 2. I assume that the key of story 1 is entered when you run the automation rule, but what about story 2?
If the are linked, then you should create a brand 'related issues' and make sure that Story 2 is selected there. Within that branch you can use an edit issue and select 'labels' as field.
Then you can use the ... menu and choose copy. Then click on 'Copy labels from current issue'. Select trigger issue and check 'add to existing values'. (see image below).
Now the Story 1 labels are added to Story 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I’m setting up a Jira automation where I have two issues, Story 1 and Story 2. Story 1, identified as ABC-1, has the labels ‘aa’ and ‘bb’. Story 2, identified as ABC-2, has the label ‘cc’.
The automation is designed to run on Story 2. When I initiate the automation on ABC-2, it asks for user input, which in this scenario is the issue key of Story 1 (ABC-1). After the user inputs this key, the automation should fetch the labels from ABC-1 and append them to ABC-2. As a result, the labels for ABC-2 should be updated to include ‘cc’, ‘aa’, and ‘bb’.
where ABC-1 and ABC-2 are not linked
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.