Forums

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

Extract jira ticket number from summary and link the extracted ticket number

Ashwini Yerabati
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 30, 2023

I am trying to create an automation rule using smartValues and want to extract the ticket number from summary and immediately link the ticket number.

 

I am having difficulty is extracting the ticket number from summary using smartvalues and the ticket number can be anywhere in the summary.

Example - 

 PROJ-1234 is a ticket with following summary

PROJ-3456 Test Jira Link

I want the rule to extract the ticket number PROJ-3456 from summary and link PROJ-3456 to PROJ-1234

Ticket numberon the summary can be anywhere ( start/end or in between the text).

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.
August 30, 2023

Hi @Ashwini Yerabati 

Would you please post an image of your complete rule, including details of what you have tried thus far to solve this?  That context will help the community offer ideas.  Thanks!

Until we see that...Your scenario might be possible, and it depends on a few things:

  1. How likely is it your summary will have other issue key values and you do not want to link in some cases?
  2. Are you only linking to issues from/to this one project, or to other projects?
  3. What should happen when there are multiple issue keys in the summary?

If #1 is likely then your rule may not be possible.  Let's assume if there is a key, you want to link to it.

Item #2 is the challenging one if you link to other projects.  For example, how do you stop people from using a hyphen/text in the summary which coincidentally matches to another issue?  And, when other projects are involved, your rule will need global scope, and that could run into the service level limits (if your are on a Free or Standard Jira license level).

If it is for one project you can use a match() function with a regular expression to get the key and link more easily.

For item #3, you just need to decide what you want to happen.  As with item #2, it is possible to parse out multiple keys, and link to each one.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events