JSON Automation update a comment if there are pdf attachment

Vandyck Lai Kai Yong June 20, 2021

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]*)\", \" https://apiit.atlassian.net/wiki/spaces/ITSM/pages/521371653/I+can+t+download+attachment+shared+via+Virtual+Help+Centre+ticket1\").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
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2021

Hi,

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.

 

Cheers,
Nick Menere
Automation Group Product Manager

Vandyck Lai Kai Yong June 22, 2021

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.

 

Regards,

Lai Kai Yong

Suggest an answer

Log in or Sign up to answer