Automation to Apply Multiple Labels at Once

Lucas Van De Graaff May 1, 2023

I have several rules that apply a label to an issue when a certain word is mentioned in the Summary but it only applies the first label that the Summary contains.

For example, if the Summary of my task says "Write a Story for MCP", automation is supposed to apply the "Story" and "MCP" labels to the issue, but currently only applies the "Story" label because it is written first in the Summary.

Here's an example of those rules:

Screenshot 2023-05-01 112348.pngScreenshot 2023-05-01 112422.png

How do I get it to apply more than once label at once without creating an individual rule for every single possible combination of trigger words in the Summary?

2 answers

1 accepted

2 votes
Answer accepted
Jan-Hendrik Spieth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2023

I'm assuming that you've checked that all rules indeed did run, as expected, and successfully, yes?

In your Edit issue fields actions, is it possible that you are using a SET configuration for the labels? If so, please select ADDREMOVE and set the labels to add. It should look like this:

rule.jpg

Lucas Van De Graaff May 1, 2023

That was what I was missing, thank you!

Like # people like this
Seth Willey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2024

You are a gentleman and a scholar sir!

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 1, 2023

@Lucas Van De Graaff Welcome to the Atlassian community

On the edit label step just use the advanced field editing under the more options section.  You can set multiple labels here by adding the following:

{
    "update": {
        "labels": [
            {
                "add": "Story"
            },
            {
                "add": "MPC"
            }
        ]
    }
}

Lucas Van De Graaff May 1, 2023

Thank you Brant! This isn't what I'm looking for, though - I need the automation for each separate rule to run and leave the issue with multiple labels attached (one for each rule), not creating a rule to apply multiple labels together because I have many different trigger words. I would then have to write a separate rule for every possible combination ("Story" + "MCP", "Story" + "Training", "Story" + "NW", "NW" + "Training", etc.)

Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 1, 2023

@Lucas Van De Graaff You can just add multiple conditions and actions to the single automation.  

Lucas Van De Graaff May 1, 2023

Since I already have a separate rule that applies each label to its specific corresponding word in the summary I was hoping there was a way to get each one to trigger instead of only the one that matches the first word in the summary.  Does that make sense?

From what you're saying it sounds like there's no way around having to create rules with each possible combo of trigger words and labels though, right?  If I'm misunderstanding can you provide an example?

Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 1, 2023

@Lucas Van De Graaff in the example you provided above the trigger was the same for the two automations.  You could just combine them into a single automation with multiple if statements and yes each one would need a rule or it would not be able to apply the label.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events