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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,455,519
Community Members
 
Community Events
175
Community Groups

Extract text from a comment to use in a field

Hi i would like some advice on how to extract specific part of text from a comment. I am looking to extract a part of line so i can then paste this into a custom field. 

 

Any advice?

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg Community Leader Jan 10, 2023

Hi @David Fawkes,

Welcome to Atlassian Community!

You can do that with smart values and automation. The smart values for text fields have lots of options to extract substrings from a field. For example I am using this in one of our automations to find Prisma Alert Ids:

{{issue.description.substringBetween("This was Prisma Alert ",",")}}

 

Thanks for this suggestion but i cannot get it to pick up the field from the comments. 

The text comes in via a comment as below and i want to take the U439090 section and put this in to a field in Jira. The number though will always be different.

 

..............................

Work Order No: U439090

Origination Date: 06/01/2023

Originator: eng-341

Asset Number: IZC12

Priority: D

@Mikael Sandberg thanks see the note above do you have any other suggestions? 

 

Thanks

Mikael Sandberg Community Leader Jan 11, 2023

So something like this should do it for you assuming that it is the last comment:

{{issue.comments.last.body.substringBetween("Work Order No: ", "Origination")}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS

Atlassian Community Events