Forums

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

Match a pattern & link tickets

Vishal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

Hi Community,

I have a requirement where I need to match a IT Order tickets with each other based on their common request numbers & link them.

So, we have two tickets with IT Order number for example ITORDER00234 in the summary & we need to link them somehow, if there a way that it can be achieved ?

Thank you for suggestions in advance.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2022

Hi @Vishal 

Do you have one of the Automation for Jira addons installed?  I believe there is a free and a paid version of this addon from Atlassian for the Server/Data Center version.  (This addon is included with Cloud.)

If so, you could use a rule triggered on Issue Create, find the related issue, and add the link.

Kind regards,
Bill

Vishal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2022

Hi @Bill Sheboy

Yes, we do have this add on installed, could you please share some more insight how can I achieve this ? Just for your info, these tickets for same IT Orders are getting created weeks apart so how do I run the search throught all of the existing tickets for a pattern ?

Thanks.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2022

To get you started on creating your rule, please review this documentation and examples:

Next, try writing a JQL statement that would find matching issues for an example such as below.  Confirm that it works as you expect, adding more criteria as needed.

project = myProjectName AND summary ~ "ITORDER00234"

Next, confirm how you know what to search for in the summary.  Let's assume the IT Order Number is always in the format you show.  You could then find it with a regular expression, such as

{{triggerIssue.summary.match(".*(ITORDER[0-9]+).*")}}

To learn more about extracting the text for the search, please look at these functions: https://confluence.atlassian.com/automation/jira-smart-values-text-fields-993924863.html

Finally, you would create your rule and test it

  • trigger: issue created
  • action: re-fetch issue data
  • branch: on JQL to match issues with 
project = myProjectName AND summary ~ {{triggerIssue.summary.match(".*(ITORDER[0-9]+).*")}}
  • action: link to the trigger issue

Suggest an answer

Log in or Sign up to answer