It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom Email Script Failing

Allen Angel May 24, 2016

I have a script runner custom email script that occasionally fails to send an email to notification to the customer.  It only seems to be failing on two issue types, and only random issues.  We use the same script in all of our Service Desk issue types and they never have trouble any where else.

I have no experience with Groovy scripting, so any ideas or suggestions will be greatly appreciated.

6 answers

0 votes
Joseba/Jorge Gailen May 24, 2016

Me too.

JIRA Service Desk 3.1.0
JIRA Core 7.1.0
Adaptavist ScriptRunner for JIRA


0 votes
Allen Angel May 24, 2016

I should have included my software versions.

JIRA v6.4

JIRA Service Desk v2.5.9

Script Runner

Teamlead CRM

0 votes
JamieA May 24, 2016

Can you check your logs after when it fails?

0 votes
Allen Angel May 25, 2016

I have set my logging level to debug and when I check the logs after a failed email there are absolutely zero warnings or errors. 

We use a transition called Notify Customer that uses Script Runner to send an email to the issue assignee, reporter, watchers, and the customer.  The customer's email address is kept in the CRM plugin and the field name is customfield_11305.

I've checked the CRM database and on the failed email issues the customfield_11305 is populated with the customer's email address.  What I have noticed is when an email fails to send on an issue, it will always fail to send on that particular issue.  Also, it only fails to send to the customer.  Our internal employees always receive the email.

Looking through the outgoing email logs, I can see the email was generated by JIRA but where the customer's email address should be I am seeing our Service Desk email address instead.

0 votes
JamieA May 26, 2016

I'm not sure what the CRM plugin is. This function only supports CFs that return users, groups, strings, or multiple thereof. Is it possible that when it works it's because one of the other fields has this user address? Can you try only using this CRM field and see if it ever works?

0 votes
Allen Angel May 26, 2016

In the workflow transition we are sending to issue field "customfield_11305" and CC issue field "assignee".  I've tried removing the CC issue field and the email will still fail to send to the customer.  The logs show the same thing....instead of sending to the address in customfield_11305, it goes to the from address of our Service Desk.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Marketplace Apps & Integrations

Demo Den Ep. 4: Continuous Integration with CircleCI & Jira Software

Get ready! Demo Den Episode 4 is coming your way on Tuesday, May 28, 2018 with a Continuous Integration and Delivery special demo. CircleCI Director of Solutions Engineering, Eddie Webb will show us ...

626 views 0 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you