I am using ScriptRunner and the built-in script "Send Custom Email" where I have the following set as a Condition:
issue.issueTypeObject.name == 'Customer Incident'
when I run the preview in ScriptRunner console I get the following message:
The condition evaluated to true (note that for listeners the condition can't normally be tested)
and the email is NOT sent out even after configuring my workflow such that I have added invocation of the script as a post function for Create Issue transition.
What I am trying to do is have an email sent out to only 1 email alias for when a Customer Incident issue is created as this will trigger our engineering escalation team to look at the issue and perform triage and further escalation if necessary.
What am I missing about using ScriptRunner to this built-in to accomplish that? The part in paranthese (note that for listeners the condition can't normally be tested) really bugs me as I think this may be root of my trouble and I'm missing a crucial step.
Thanks!
Community moderators have prevented the ability to post new answers.
yes - all issues types, including Customer Incident, are associated w/ the same workflow
ssue.issueTypeObject.name == 'Customer Incident' <--- this is the evaluation, if this is true (The ticket issue type is Custom Incident" it should send an email.
Can you double check if the "Custom Incident" issue type is using the worklow with this script post-function?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gabrielle,
Thanks for rapid response!
Yes I checked atlassian-jira.log and atlassian-jira-outgoing-mail.log and did not see anything at the time of the Create Issue event that looked out of the ordinary......
I'm wondering if simply setting the condition to issue.issueTypeObject.name == 'Customer Incident'
is sufficient and whether I need to set a test for the condition, somewhere, based on the response I get from the Preview function in ScriptRunner console
The condition evaluated to true (note that for listeners the condition can't normally be tested)
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the condition is Evaluated to true then the script passed the validation so it should send an email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where is the evaluation performed? Do I need to add that part to the Condition in the ScriptRunner configuration ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you check the logs if there any hints about the email?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.