Hello,
I've looked through similar problems on the wiki to find an answer but can't resolve it.
I'm running the plugin on both 4.4.3 - Windows and 5.0.1-Centos versions and still getting this error. It can find the file but can't run it. Works fine in the admin panel but when I strip it out and save it to a file, I get this error:
java.lang.Exception: Cannot find a script engine for extension: "groovy"", (make sure it's on the classpath).
Greatly appreciate anyone's feedback. Thanks in advance.
Jody
Test Script is:
import com.atlassian.jira.ComponentManager
import com.atlassian.mail.Email
import com.atlassian.mail.server.MailServerManager
import com.atlassian.mail.server.SMTPMailServer
ComponentManager componentManager = ComponentManager.getInstance()
MailServerManager mailServerManager = componentManager.getMailServerManager()
SMTPMailServer mailServer = mailServerManager.getDefaultSMTPMailServer()
if (mailServer) {
Email email = new Email("ladives@gmail.com") // Set the TO address, optionally CC and BCC
email.setSubject("JIRA Test") // todo: check the subject value
String content = "Hello!!!!!! "; //TODO: Set email's body.
email.setBody(content)
mailServer.send(email)
}
In entering the file name, I used quotes around the file name - "C:\Program Files (x86)\Atlassian\JIRA\groovy_scripts\custom.groovy". I simply removed the quotes and it worked! I made an assumption that it could not process spaces in the file path.
Just a follow up - this is using the Script Runner plug-in for JIRA.
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.