Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to truncate text while copying a comment field

Eric Bergeron
Contributor
March 10, 2023

In order to have a glimpse of the last comment added to a ticket without opening it, while in a Filter view or Dashboard, I would like to copy only the first 255 characters or first few words of the last comment. 

Currently, I copy the last comment added on a ticket to a multi-line field, however this creates big spaces in the filter view if that comment was long. 

 

Any help would be appreciated, thanks!

1 answer

1 accepted

3 votes
Answer accepted
Mark Segall
Community Champion
March 10, 2023

Hi @Eric Bergeron - I assume you're trying to copy the truncated text via automation?  If so, you could do this (Assuming your custom field is called "Last Comment"):

  • TRIGGER: Issue Commented
  • ACTION: Edit Issue (Last Comment)
    • {{comment.body.left(255)}}
Eric Bergeron
Contributor
March 10, 2023

Hello @Mark Segall - This has really helped me. Actually, I am not truncking the comment itself, but rather I'm copying the text from the last comment added into another text field, which I add as a column on our dashboard. 

This is what I ended up putting: 

TRIGGER: Commented is the main action
ACTION:  Field X = {{issue.comments.last.body.left(255)}}

Like Mark Segall likes this
Eric Bergeron
Contributor
March 10, 2023

@Mark Segall Thank you!!

Like Mark Segall likes this

Suggest an answer

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

Atlassian Community Events