Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Jira automation. Trying to extract part of description field to a smart value.

I am trying to setup an automation rule that does the following

- when issue created

- if description contains the text “ref:”

- extract the ref: and subsequent 10 characters from the description to a smart value (text to extract could be anywhere in the description field)

- add the smart value to the end of the summary field

I am having trouble with the extract part. Can anyone help? Thanks

1 answer

0 votes
John Atlassian Team Oct 08, 2020

Hi @Neil Ingram 

You can use a regex expression on the existing description smart value to extract the text. It will look something like this:

{{issue.description.match("(ref\:.{0,10})")}}

This will extract the ref: and the next 0-10 characters after it. If you know the ref: will always be exactly 10 characters you could use (ref\:.{10}) . 

Your rule will look something like this:

 

Screen Shot 2020-10-09 at 12.32.27 pm.png

 

Hope that helps,

John

I have tried this multiple ways and it doesn't work for me at all. 

 

I have tried and all give errors that smart value is not found: 

{{issue.description.match(“(\w+-\d)”)}}

{{issue.fields.description.match(“(\w+-\d)”)}}

{{issue.description.match(“([A-Z]+-\d)”)}}

{{issue.fields.description.match(“([A-Z]+-\d)”)}}

John Atlassian Team Jan 06, 2021

Hi @Amanda Ward 

Could you give an example of what you're trying to extract from the description and the signifier to look for?

In the example above the signifier is the string ref: in the issues description. The smart value then extracts the ref: AND the 10 characters after it. So if the description was "The background colour should be N10 ref:1234567890" the smart value example above would output ref:1234567890.  

Thanks,

John

This first method works for the Comments Body field without issue, but will not work for the Description field. 

 

Here is the first way I tried: 

image.png

 

Here is the second way I tried: Set it up to "EDIT Issue" using all the various smart values i entered in the first message a couple days ago. 

image.png

This is how the value is being entered in the Description: 

image.pngJira automatically recognizes "WARD-206" text as a reference BUT I did NOT use the anchor links as shown in Text Tab:

image.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,072 views 8 28
Join discussion

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