Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation rule not capturing label value using match() with colon in regex

Daphne Casal
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!
October 21, 2025

Hi everyone,

I’m setting up an automation rule to automatically link related issues between two projects — a team-managed (MIP) and a company-managed (MPD) project.

Each issue has a label in the format ws:<stream>, for example:

ws:branding 
ws:dns
ws:integration

In my rule, I’m iterating over all MIP child issues under an epic, and I want to extract the ws: label from each issue to find its matching MPD issue (with the same label).

Here’s the relevant part of my rule:

  • Branch: parent = "{{userInputs.mipEpicKey}}"

  • Create variable:

{{issue.labels.join(",").match("(ws:[^,\\s]+)").first}}

Log:

Found wsLabel={{wsLabel}} on {{issue.key}}

However, in the audit log, the wsLabel variable is always empty:

Found wsLabel: for MIP-123
Found wsLabel: for MIP-234
Found wsLabel: for MIP-345

All these issues definitely have labels, so I’m confident the data is there.

I also tried escaping the colon like this:

{{issue.labels.join(",").match("(ws\\:[^,\\s]+)").first}}

but it still returns nothing.

 What I’ve checked 

  • Confirmed {{issue.labels}} returns all labels (it does).

  • Tried contains("ws:") and that works, but I need the exact match (e.g. ws:branding).

  • Tried several variants of the regex (ws:.*, ws\\:.*, etc.).

  • The rule scope includes both projects.

 Question

Has anyone successfully used match() in Automation for Jira with labels that include a colon (:)?

If so, what regex syntax or workaround did you use to extract the label value?

The end goal is to use that ws: label in a Lookup Issues JQL, e.g.:

parent = "{{userInputs.mpdEpicKey}}" AND labels in ("{{wsLabel}}")

Any help or examples would be appreciated!

Thanks,

Daphne

1 answer

0 votes
Christos Markoulatos
Community Champion
October 21, 2025

Hey Dafny

I tried the below and worked for me, check it out:

Test Rule

  • Trigger: Manual
  • Actions:
    1. Log:
      Labels raw: {{issue.labels}}
    2. Create variable:
      Name: wsLabel Value: {{issue.labels.join(" ").replace("^.*\b(ws:[A-Za-z0-9._-]+)\b.*$","$1")}}
    3. Log:
      Matched wsLabel: {{wsLabel}}

 Screenshot 2025-10-22 091660.png

Result

Audit log showed:

Labels raw: ws:branding

Matched wsLabel: ws:branding

Screenshot 2025-10-22 092255.png

Hope this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events