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,556,526
Community Members
 
Community Events
184
Community Groups

Using automation to truncate comment body to remove email history

For many customers (using Outlook), we get the entire message history when they reply to our custom emails coming from JSM. Those custom emails have all of the current ticket comments included. This is causing the JSM UI ticket comments to be quite long and difficult for our Support people to read through. 

 

I'd like to add an automation for when comments come in on an emailed ticket to remove anything starting with "From: no-reply@automation.atlassian.com" as we don't need the ticket history duplicated in each comment, but I'm not finding anything online about how to truncate a comment using Jira Automation. 

 

Any help would be greatly appreciated! 

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2023

Hi @Heather Hanchett 

You can use the substringBefore smart value to get the values you want https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#substringBefore-String-separator-

So you could use something like the following:

{{issue.description.substringBefore"From: no-reply@automation.atlassian.com")}}

Thank you Alex, will see if this works for comments! 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2023

@Heather Hanchett hi!

Did you manage to do it?

Yes, it worked in testing! 

{{issue.comments.last.body.substringBefore("Test string here")}}

Suggest an answer

Log in or Sign up to answer