I performed several tests on appeal "Send a custom email" in "Script Runner Builtin" it works for viewing and sending email. But when I insert the script in "Post-Function" in Transition "Create Issue" it does not send e-mail and returns no error.
Here are the codes used
Condition: ['Blocker']. Contains (issue.priority '. Name)
Email template: The $ $ issue.issueType.name issue.key was created with priority <% Out << issue.priority '. Name%>. <br>
Summary: $ {} issue.summary <br>
Responsible: $ {issue.assignee '. Name}
Subject template: The Bug Blocker: $ issue was created | DISCLAIMER |
Email format: HTML
To addresses: e-mail address
What could be wrong?
I think you will need to change it so that:
$issue.issueType.name $issue.key
looks like:
<% out << issue.issueType.name < " " < issue.key %>
That is, for what you've done with the priority do the same with the other fields.
The problem is that OSWorkflow tries to be clever and converts any args with a $ in to a field and substitutes a null.
O <% out << issue.issueType.name < " " < issue.key %> foi criado com a prioridade <% out << issue.priority?.name %>. <br> Resumo: ${issue.summary} <br> Responsável: ${issue.assignee?.name}
Jamie,
Now is giving syntax error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You still haven't changed the last two lines. Use the email test in Admin -> Built-in scripts. Build it up step by step starting from something that works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Condition: ['Closed'].contains(issue.status?.name) Email template: A ${issue.key} foi finalizada. <br> Resumo: ${issue.summary} <br> Responsável: ${issue.assignee?.name}
I tested this in another post of Transition Functions: Close Issue and neither worked. Below the screens of Builtin Script Runner (that works and even sends e-mail) and the code in Post Functions (which does not work and does not send e-mail).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
O $issue.issueType.name $issue.key foi criado com a prioridade <% out << issue.priority?.name %>. <br> Resumo: ${issue.summary} <br> Responsável: ${issue.assignee?.name}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you copy & paste your code to a code block using the code icon of the editing area? It looks a little bit messed up in the current way.
Henning
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.