Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,139
Community Members
 
Community Events
168
Community Groups

Link JIRA tickets when they are mentioned in comment

Hi,

I would like a way preferable via automation for jira that anytime a ticket is mentioned in JIRA it would automatically link it in JIRA.

is it possible?

1 answer

0 votes

Hi @Neetu Verma

Can I confirm what you mean by link in Jira?

When you mention a specific issue key (eg. ABC-123) in Jira, it should already create a link to that ticket.

If that isn't working, let us know - along with the hosting type for your instance (eg. Cloud, Data Center, etc).

Ste

Thanks for your response, but yes when I mention a ticket in JIRA comments it actually doesn't link two tickets automatically. 

Hosting: Cloud

Hi @Neetu Verma 

So you mean when an issue key is commented, you want it to automatically create an issue link between the key commented and the key the comment is applied to?

That could be quite difficult; what is the use case for this?

Ste

Thanks, yes that is exactly what I would want.  We have team members who are commenting on tickets especially if an issue is caused by a fix on another ticket.

We have to always manually link them, and I was hoping to find a way that when developers add a comment and enter a ticket number it would automatically create a link for these two tickets. 

Hi @Neetu Verma 

Turns out it's not actually that difficult after all!

To do this:

  1. Go to Automation for Jira and create a new rule
  2. Select the trigger "Issue Commented"
  3. Select the Action "Link Issues"
  4. For This Issue, select what link type you'd like to use
  5. Next in issue value, type in the smart value: 

    {{comment.body.match(“([A-Z]+-\d)”)}}

  6. Give the rule a name and publish it

This will locate each mentioned issue key in a comment and link it to the issue it was commented on.

You can specify a specific project if you prefer - so your smart value would be: {{comment.body.match(“(ABC-\d)”)}} where ABC is your project key.

In case it's not clear, the slash before the d is this character - /.

Ste

I have been trying this but it doesn't seem to be working for me. Audit Log just keeps failing. 

 

Failed to get value for comment.body.match(“([A-Z]+-\d)”): {{comment.body.match(“([A-Z]+-\d)”)}}

 

I tried: 

{{comment.body.match(“(\w+-\d)”)}} and that works only if the project is in capitals, not sure why your verison didnt work. 

 

but the same concept wont work for the description field. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Apps for Confluence you won't want to miss: RSVP for September's Appy Hours

Calling all collaborators and Confluence users! Our Appy Hours event on September 29th features 4 presenters demoing functionality to superpower Confluence. Don't miss learning about these apps i...

120 views 0 9
Read article

Atlassian Community Events