Recognize internal comment in Automation for JIRA

Deleted user May 15, 2018

Hi,

I am trying to see if the comment added (it is also a trigger) is a public or internal one. I have found the smart values like 

{{issue.comments.last.body}}
{{comment.internal}} 

 but I am not sure where should they be compared, and I am pretty sure the true or false would not equal the result of last or last.body.

Does anyone know the best smart values or other way to do this?

2 answers

1 accepted

4 votes
Answer accepted
Deleted user May 15, 2018

{{comment.properties."sd.public.comment".internal}}

equals

false (or true)

is how I managed to resolve it

Junio Fernandes August 14, 2018

How is this supposed to work? What "sd.public.comment" means? I've tried this but doesn't work. Tks.

Stephen Letch February 15, 2019

Thanks @[deleted] 

Keven Perreault February 4, 2020

Thanks @[deleted] worked like a charm !

Jim Copeland February 23, 2022

Where can we find these regex property values? Hoping to find more like this for other tasks.

Asbjørn Søborg-Madsen March 20, 2022

If you are looking for what regEx you can utilize you can check out Pattern (Java Platform SE 7 ) (oracle.com)

 

If you want to know what fields Jira exposes you can start here What are smart values? | Cloud automation Cloud | Atlassian Support

 

I find it easier to just test against an actual issue with the JSON exposed at:

https://YOURNAME.atlassian.net/rest/api/2/issue/ISSUEKEY?expand=names
replace the values in bold with your own.

Noah Hofmann June 9, 2023

This is gold! Thank you!

1 vote
Filipi Lima
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2023

A quick note - on Server/DC 9.4.1 I just tested it with:

{{comment.internal}} 

I had a simple rule with "when comment created" and I use advanced compare condition to match that to true or false and it worked correctly.
image.png 

eilon_elphi October 30, 2023

This was great - exactly what i needed. on my end, needed the "does not equal", but most importantly needed to know the path {{comment.internal}}. thx @Filipi Lima !

 

worked as expected.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events