Comment List Without Internal Comments

Lewis West
Contributor
October 20, 2023

Our team has been using automation internally and taking advantage of the {{#issue.comments}} to get a list of all comments via email.  This is helpful internally.

Now we're looking at an automation for our customers and want a list that doesn't include any internal comments.

I've tried {{#issue.comments.public}} and {{#issue.comments.external}} without any luck so far.

Thanks for any help with it.

 

Edit: if it helps, this is what we currently use for the comments list:

{{#issue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}

{{/}}

1 answer

1 vote
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2023

@Lewis West -

You will need to use the following smartvalue syntax testing for {{comment.internal}} property value to test for comment (private/public)

{{comment}}

This value won't work for any other trigger, even if a comment was added as a result (e.g. - the Issue transitioned trigger).

Available properties

  • {{comment.body}} - Returns the body of the comment that triggered the rule.

  • {{comment.author}} - Returns the ID of comment's author.

  • {{comment.created}} - Returns the date and time of the comment.

  • {{comment.visibility.type}} - Returns the comment restriction type if any, e.g. role.

  • {{comment.visibility.value}} - Returns the comment restriction label if any, e.g. Developers.

  • {{comment.internal}} - for Jira Service Management comments, returns false if the comment is visible to customers.

  • {{comment.properties}} - Accesses any comment property. Properties are frequently used by add-ons and integrations to store values.

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

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Lewis West
Contributor
October 23, 2023

Thanks for the suggestions. 

I tried running an if then check for {{comment.internal}} within the {{#issue.comments}} list, but I wasn't able to get the syntax right.

Any tips on how to check that for the private/public property while running a list of all comments like {{#issue.comments}}?  Or how to just run a public list itself?

Thanks for any further assistance on how to use the property.

Suggest an answer

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

Atlassian Community Events