Linking issues where summary matches the trigger issue description

Sofia Shaldikova August 17, 2023

Hi everyone,

I have tickets (issue type 1) with a list of emails in the description field. In the same service desk I have tickets (issue type 2) with each of these emails in the summary and there is only one email in the summary of each ticket. I want to set an automation to link the 1st ticket (with the list of emails in the description) with each of the tickets that have the respective emails in the summary.

The trigger would be when the 1st issue type ticket is created. Could you please help with setting up the automation to find the related tickets to link them (the ones which has email in the summary which is one of the emails in the description of the trigger ticket)?

 

I searched though the previous questions and documentations and tried different options, but still couldn't figure it out.

I tried looking up for issues and linking them, or setting up branch rule with JQL and linking issues. I tried different JQL options, for ex.:

"{{issue.description}}" ~ summary
summary ~ "{{issue.description}}"
summary ~ "\"{{description}}\""

but none of them works.

1 answer

1 accepted

0 votes
Answer accepted
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2023

Hi @Sofia Shaldikova,

Here's the rule:

Rule Overview.png

You'll need to create two variables. Let's break the rule down step by step:

  1. Add the action Create variable to find emails in the issue Description:
    Variable name: emails
    Smart value: {{issue.description.match("([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)")}}
  2. Add a branch with the option Advanced branching. Set these values:
    Smart value: {{emails.split(",")}}
    Variable name: email
  3. Add the action Lookup issues with JQL summary ~ "{{email}}"
  4. Add the action Link issues and set {{lookupIssues}} in the issue dropdown.

As a result, the issues should be linked:

Rule Success.png

Sofia Shaldikova August 18, 2023

Hi @Kseniia Trushnikova,

thank you very much, it works!

Like Kseniia Trushnikova likes this
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2023

giphy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events