Hi,
we would like to send out custom emails, where the body of said email differs depending on the event (update, creation, commented) and where we can see the changes (in case of an updated ticket)
Unfortunately I seem to not be able to find any listing of possible variables to use in the Template.
Can anyone point me to the right direction on where to find (or generate) all possible variables?
There is not much more than what you can see in the example mail here: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Sendacustomemail
"issue" should have most of what most people need.
There are a few variables for comments, but that's explained in the doc.
Is there a way to print changes or which event triggered the listener? At the moment I distinguish by "lastComment", but this will not work on a changed Ticket: {code} <% if (lastComment) { out << "The " << issue.issueType.name <<" https://jira/browse/"<<; issue.key << " with priority " << issue.priority?.name << " has been updated:\n" out << "Last comment: " << lastComment } else { out << "New " << issue.issueType.name <<" https://jira/browse/"; << issue.key << " with priority " << issue.priority?.name <<":\n" out << "-----------------------------------------------------\n" out << issue.description } %> {code}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can look at event.eventTypeId, which corresponds with one of these: https://developer.atlassian.com/static/javadoc/jira/6.3/reference/com/atlassian/jira/event/type/EventType.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tobias Vollmer Were you able to get changes or events which triggered the listener? I am sending email for almost all events and would like to differentiate in the email body if possible. Any help would be appreciated!! Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bhupesh Nagda, unfortunately I was not able to get the changes. To the event triggered can be accessed with "event.eventTypeId". Please be aware that the use of this Variable will cause the Preview to throw an exception (as no event is triggered). We used the Eventtype in a switch statement: <% switch (event.eventTypeId) { case "1": //Created out << "has been created." break case "2": //Updated out << "has been updated." break case "5": //Closed out << "has been closed." break case "6": //Commented out << "has a new comment." break case "7": //Reopened out << "has been Reopened." break default: //Unknown out << "has triggered the event: " << event.eventTypeId } %> Cheers, Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.