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.
Would you mind sharing a rough template of what you ended up getting to work?
I need something very similar to what you describe initially.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.