Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

92 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you