🚀 Effective since April 2020 and JWT version 2.9.0 Automation Toolbox for Jira is fully integrated into our top rated app Jira Workflow Toolbox (JWT)🚀

On this page

Use case

A handy option in Jira is to use issue keys in comments to reference them whenever needed. But as the amount of comments grow, it can get hard to keep track of all mentioned issues in the comments. Therefore, the following rule checks for issue keys being added to comments and automatically links them to the current issue.



Issue Commented event

Create a new rule and name it appropriately.

Providing a description will help you to identify what the rule does but this step is optional.


Add a trigger → Issue event → Issue Commented

No further configuration needed. The automation rule is triggered every time an issue is being commented.

Boolean condition

Add a ConditionBoolean Condition 

Expression*

Use the following Parser Expression:

findPattern(%{trigger.issue.lastComment},"([A-Z][A-Z0-9]+)-\\d+") !~ null

Boolean expressions are logical constructions that return true or false.

The findPattern() expression parser function extracts the issue key from the last comment.

Create issue link action

Next to the Boolean Condition click on Add → Action → Create issue link

Issue link type* 

Choose relates to (Relates)

Issue selection*

Choose Issue List Expression

Use the following Parser Expression*:

issueKeysToIssueList(toString(findPattern(%{trigger.issue.lastComment},"([A-Z][A-Z0-9]+)-\\d+")))

The findPattern() expression parser function extracts the issue key from the last comment.

Enable the rule by clicking on the Enable button → 

Screencast

This is how the configuration above should look on your screen

Related use cases


If you still have questions, feel free to refer to our support team.