You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
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'> {{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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.