Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira Automation Rule doubling Linked Issue

Hello,

I'm just starting to get into Jira Automation and I have a rule that creates a "Relates to" Link if another ticket is mentioned in a comment. While reviewing the audit log this morning I noticed that a pair of tickets were linked to each other twice. This is not an ideal behavior, so I was wondering if anyone could help me add some logic to prevent this.

Double Linked Tickets.pngScreen Shot 2021-01-27 at 8.21.32 AM.png

Rule.png

3 answers

1 accepted

0 votes
Answer accepted

Hello All,

I was finally able to figure it out. Here is my overall rule

Screen Shot 2021-03-01 at 9.41.25 AM.png

The change was adding the 2nd comparison after learning more about smartvalues.

Adding one more conditional before your Link action should do it.

I recommend the "Related Issues Condition" which allows you to test Linked Issues.

In the JQL, use this:

linkedIssue = {{comment.body.match ... }}

Below is a test rule I created to validate this approach:

Screen Shot 2021-01-27 at 8.42.17 AM.png

Good Idea @Mykenna Cepek ,

The challenge is that the related issues condition doesn't use regex 

Do you get an error when you used your regex in the smart value for the "Matching JQL" field? That would surprise me -- I'd appreciate seeing that error.

My suggestion was to set the "Matching JQL" field for this new condition, for your situation, to be this:

linkedIssue = {{comment.body.match("([A-Z]+-\d+)")}}

My test rule doesn't use it, but I'm proposing the new conditional in your rule would.

This would prevent creating another link (of any link type) to the same issue.

Thank You @Mykenna Cepek - I misunderstood the validation message on that condition. I have added it and I'll see how it goes.

I really appreciate you helping me out

Screen Shot 2021-01-27 at 11.21.19 AM.png

0 votes
Stuart C Community Leader Jan 27, 2021

Hi @Fred Deichler 

Are you only expecting each ticket to have 1 link - that's easier to work around:

Capture.JPG

@Stuart C - unfortunately not as we have numerous projects

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Trello

📹 Favorite Trello templates

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. In this video, I'll share my favorite Trello templates. Templates mentioned in ...

75 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you