Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting Other Plugins with Data Center

Irtiza Rizvi January 21, 2019

Hello,

We recently upgraded to JIRA Data Center 7.12.3 and ScriptRunner 5.4.47.

We use a custom script post-function on the Create transition in one of our workflows that scripts a separate plugin (Metadata for JIRA).  We have 2 nodes and the script works on node 1 but not node 2.

Here is the start of the script:

import com.mindprod.csv.CSVReader
import com.atlassian.jira.component.ComponentAccessor
// ... more imports ...

import com.osoboo.jira.metadata.MetadataService

import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin

import org.apache.log4j.Level

log.setLevel(Level.DEBUG)

@WithPlugin("com.osoboo.jira-metadata-plugin")

@PluginModule
MetadataService metadataService

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def issueManager = ComponentAccessor.getIssueManager()
def userManager = ComponentAccessor.getUserManager()

def user = ComponentAccessor.getJiraAuthenticationContext()

// ... do stuff with managers and plug-in service ...

 Here is a screenshot of the error:

ScriptRunnerIssue.png

Again, it works just fine on node 1 (no errors, expected behavior), but throws a java.lang.NoClassDefFoundError on node 2.  The plug-in key in the script matches the app key for the Metadata for JIRA plug-in.

Please advise.  Thanks.

1 answer

0 votes
Aron Gombas _Midori_
Community Champion
January 22, 2019

When you look at the installed apps' list in UPM on node 2, can you see the Metadata app? Is that installed correctly and is in enabled state?

Suggest an answer

Log in or Sign up to answer