ScriptRunner: 'Send an email' is not working properly.

aligntechsupport October 26, 2015

I've just figured out that 'Send an email' feature of the ScriptRunner is not working properly for us. We use it to send an automatic reply to the user with the link to his request (which he files to us by sending an email to a specific mailbox).

When a user sends an email with the following subject: 

'"${bamboo.capability.system.git.executable}"' is not recognized as an internal or external command ON Agent

It's all to do with "$bamboo" string in the subject.

JIRA issue does not have transition buttons when created via email with this subject. This 'poisonous' email cannot be removed by JIRA. I had to open the mailbox and remove it. Otherwise, JIRA reads the letter and keeps creating issues that don't have transition buttons. 

When I remove this post-function from the workflow everything works as expected - JIRA issue has got all the buttons, etc.

2 answers

0 votes
aligntechsupport October 26, 2015

Hello

Sorry for the confusion. Let me put it in other words.

 

  1. There is a default JIRA mail handler that creates JIRA issues for us. The issues are created from the emails users send to a special mail box.
  2. As soon as the issue is created, 'send an email' post function send an email back to the user with the link to the issue.

Everything works like a charm until someone sends an email with '"${bamboo.capability.system.git.executable}"' string in the subject. As a result, the issue gets created but: a) it won't have transition buttons; b) the JIRA mail handler won't be able to remove such email; c) the JIRA mail handler will be creating new issues for us every 2-3 mins (specified in the handler's settings).

 

When I remove this post-function from the workflow, everything works as expected.

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.
October 26, 2015

This is confusing for me. The "Send an Email" post-function does not create issues sent via email but you suspect it's the cause of the "disappearing transitions" by removing this post-function.

What add-on do you have that creates issues via email? Do you have any other post-functions in place? The workflow transitions is usually controlled by permissions and sometimes the status of the issue (workflow properties can lock transitions based on issue status). Any errors being logged during the create process?

Suggest an answer

Log in or Sign up to answer