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

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

JSON Automation update a comment if there are pdf attachment Edited

I would like to auto update a comment whenever our agent include a pdf attachment in the response to customer. The update contains a newly appended user guide link on how to download / view the attachment.

This is the screenshot of my automation

auto edit automation.PNG


This is the JSON format in my automation, but it does not work.

"update": {
"comments": [{
"set": "{{issue.comments.last.body.split(\",\").first.replaceAll(\"Change: ([0-9]*)\", \"\").concat(\"\\n\").trim()}}"


I had reviewed these links on trying to solve my issue. Is it possible to achieve what I demand or is there any other way of doing it using automation?

How-do-I-replace-text-in-the-last-comment-posted (Community Forum) 

Jira Developer documentation updating-an-issue-via-the-jira-rest-apis-6848604

1 answer

1 accepted

1 vote
Answer accepted
nmenere Atlassian Team Jun 22, 2021


The edit issue API doesn't allow you update a comment as it isn't considered a field.

In the next day or so we will release the Edit Comment action which should enable you to do this.


Nick Menere
Automation Group Product Manager

Hello Nick,


Thank you for your explanation but I would like to know is there any alternative rather than just using automation to edit a comment when it detect pdf attachment? For example, some thing like an application extension?


Hope to hear from you soon.



Lai Kai Yong

Suggest an answer

Log in or Sign up to answer

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