Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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?

Unbenannt.PNG

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:

{{issue.description.match("ISBN:\s(.*)")}}

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
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

JSM June ask me anything (AMA)

Hello Community members! We’re wrapping up the end of JSM June with an Ask Me Anything (AMA) with the Jira Service Management product team. This is your chance to ask all your ITSM questions to o...

120 views 7 10
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