Hi!
I need advice.
I use built-in script "Send custom email": https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-SendCustomEmail
Event: Issue commented
Condition: issue.status?.name == 'New'
Subject template: Issue $issue was commented
How can I paste new comment in 'Email Template'?
Thanks for finding that Daniel... however I think that will fall over when there are no comments.
I have updated the sample template in https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Sendacustomemail (Point 3).
Make sure you use the if, or if you don't, at least test it with an issue with and without comments in builtin scripts -> Send a custom mail (which is used for testing templates).
Hi,
simply adding the line:
$comment.getBody()
should "paste" the new comment into the email.
You should check https://confluence.atlassian.com/display/JIRA043/Velocity+Context+for+Email+Templates for more info.
no result
this listener works if i paste some constant text, but with this line - no
Sorry, it wasn't as simple as I thought.
try
<% out << componentManager.commentManager.getComments(issue)?.last()?.body %>
Found the answer in this comment.
I like this template, thanks
yeeeeeah
Thanks!!
Jamie,
How do you get the comment of the last transition - if any.lastComment is set, even if the transition didn't have any comment,so containing a comment which is not relevant to the transition.
Francis
Yeah... that's no good is it. Can you create a bug, I will try to fix. I don't think the email template has access to transientVars or event, to get the comment added on that transition.
Access to transientvars would fix this issue.https://jamieechlin.atlassian.net/browse/GRV-449
It looks like you're new here. Sign in or register to get started.