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
Community Members
Community Events
Community Groups

smart value for extracting certain parts of an issue and use it as label

Dear All,

I have created a mail handler in JIRA Core so issues are created for incoming mails.

These mails contain words or catch phrases which are the base for the labels in the issue. I want JIRA to automatically label the issues on the base of the Description.

I have suceeded in setting up the rule for fixed terms:

When: Issue Created

Branch: For Current Issue

Description Contains {{a certain word}}

Then: Edit Issue Fields


Now I am wondering if it is also possible that JIRA recognizes a certain word in the Description (let's say "cost") and takes the 10 digits after that word and puts this number in a pre-defined "cost" label?

Thanks for your help!

Best, Corinna

1 answer

1 accepted

0 votes
Answer accepted

@Corinna Haberbosch

Sure you can.  Try using the smart value configured like this:

{{issue.description.match(".*cost ([0-9]{10}).*")}}


This will grab exactly 10 digits following the text "cost ". If there are fewer than 10 digits it won't work. If you wanted to grab any number of digits, you could instead use a smart value like this:

{{issue.description.match(".*cost ([0-9].*).*")}}


My automation rule is configured as follows:


Screen Shot 2021-02-23 at 1.21.43 PM.png

Dear Kean,

thank you for the prompt reply.

It doesn't work yet, so here is my concrete use case:

The Description Text contains an ISBN which is formatted as follows:

ISBN: 978-1-5015-1655-9

There is a predefined text field "ISBN" and I want the 17 digits to be drawn into this field.

I have adjusted your smart value suggestion as follows.

Maybe you have another suggestion?


Your match function is wrong.

Try this:

{{issue.description.match(".*ISBN: ([0-9]{3}-[0-9]-[0-9]{4}-[0-9]{4}-[0-9]).*")}}

Dear Kian,

ah - now I got the twist :)

I have used this in the meanwhile:


which also worked.

But thanks, that was helpful! I think I understood the rule now.

Best, Corinna

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events