Forums

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

Jira Automation: Edit Comment get ID of comment

Dominik Kölsch August 9, 2023

Greetings!

I'm trying to edit a specific comment containing a string that only happens if the comment exists - that condition is working. 

But when I try to get the right comment id with the following smart values, it does not work in the field for the id, but when I use it in a comment. 

 

{{#comments}}
{{#body.endsWith("String")}}
{{first.id}}
{{/}}
{{/}}

Does anyone has an idea why it does not work and how to make it work?

1 answer

0 votes
Nicolás Figueroa
Contributor
August 10, 2023

Hi, this works for me: 

{{#issue.comments}}{{#if(exists(body.match(".*(YOUR TEXT).*")))}}{{id}}{{/}}{{/}}

 

This will retrieve the id of the comment which has YOUR TEXT

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events