It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hi All and Jamie
There's 'Send Custom Email' post-function in which we define mail subject and body using GStringTemplateEngine. I can put ${issue.description} or <%= issue.description %>, but how do I properly escape HTML tags given that we are bound to the processing template context? In Velocity Templates we'd use something like $textutils.htmlEncode.
Also, we may have a wiki renderer set to a field, in Velocity we'd play like $!{rendererManager.getRenderedContent("atlassian-wiki-renderer", $comment.body, $issue.issueRenderContext)}. How we'd run it from GStringTemplateEngine?
Cheers,
Oles
After struggling a bit with it looking at the sources found solution that works somehow:
<% def rendererManager = componentManager.getRendererManager() def descriptionLayoutItem = componentManager.getFieldLayoutManager().getFieldLayout(issue).getFieldLayoutItem("description") def descriptionRenderer = rendererManager.getRendererForField(descriptionLayoutItem) %>
and then
<%= descriptionRenderer.render(issue.description, null) %>
Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.