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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Project Automation And Smart Values For Public comments only?

Hi, I am trying to edit an email template I created to include the chat history of the ticket - but am running into a bit of trouble. I hope there's some super simple fix I'm just not thinking of, but can someone direct me to the proper way to achieve my goal with Smart Values?

 

To get the conversation history, I am using

{{#issue.comments}}<img src='{{author.avatarUrls."24x24"}}' width='24px' height='24px' style='margin-top:5px'>&emsp;{{author.displayName}}: {{body}}<br>{{/}}

This snippet gets every comment on the ticket with the profile photo of the author and their name next to the body of the comment, and works great!

The problem is that this method ALSO shows Internal comments? I can't find any way to compare the conditional directly in the HTML, or only fetch public comments to begin with which would be easiest. Any tips?

1 answer

can you use? {{comment.properties."sd.public.comment".internal}} I think it brings back true or false for the comment.

 

I had a similar issue for xportrt. Customers could xport the ticket and see all the internal comments.

 

I used this:

 

#{for comments}

#{if (%{!${Comments[n].Internal}})}

${Comments[n].Author}

${Comments[n].Body}

#{end}

#{end}

 

This only showed public comments.

 

You might have to play with it but it might be similar in Automation.,

 

Phil

Thanks Phil, I was able to come up with another solution using {{#if(conditional)}} {{/}} blocks. Surely it isn't as efficient but it works great so far, and the template has already been put into effect. 

I'm not sure this will work though, because those don't look like smart values. You're using single curly-braced values in your plugin, whereas Automation for JIRA is native and uses Smart Values that utilize a double-curly brace. Maybe i'll give it a try but I don't even think SV would support a #{for} loop.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

189 views 1 6
Read article

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