Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

scriptrunner note that for listeners the condition can't normally be tested

Ken_Collins July 1, 2015

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!

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Ken_Collins July 2, 2015

yes - all issues types, including Customer Incident, are associated w/ the same workflow

 

0 votes
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2015

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?

0 votes
Ken_Collins July 1, 2015

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!

GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2015

If the condition is Evaluated to true then the script passed the validation so it should send an email.

Ken_Collins July 1, 2015

where is the evaluation performed? Do I need to add that part to the Condition in the ScriptRunner configuration ?

0 votes
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2015

Can you check the logs if there any hints about the email?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events