Unable to resolve custom class - Scriptrunner 3.0.6


Im trying to migrate scripts from a previous version into 3.0.6 and having some difficulties.

I have a class on the server which I have moved into the script root in a folder called util.


package util

import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.link.IssueLink

class CRTransitionConditionStatus {
    public boolean result = true
    public ArrayList failedFields = []
    public ArrayList subTaskCompleteStatus = ['10030', '10034']
    public boolean checkConditionByStatus(Issue issue) {
     return false
    public boolean checkConditionByWorkflowID(Issue issue, int workflowID) {
        try {
        } catch(all) {
        }  finally {
            return false

I am then trying to use this class within a workflow condition by using the following

import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.Issue
import groovy.sql.Sql
import org.apache.log4j.Category
import com.opensymphony.workflow.loader.WorkflowDescriptor
import groovy.xml.MarkupBuilder
import util.CRTransitionConditionStatus

def t = new CRTransitionConditionStatus()
boolean result = false
log = Category.getInstance("com.onresolve.jira.groovy.CRTransitionConditionStatusWorkflow")
    ComponentManager componentManager = ComponentManager.getInstance()
   // Issue issue = componentManager.getIssueManager().getIssueObject("CR-283")        //for testing
    WorkflowDescriptor wd = transientVars['descriptor']
    result = t.result
} catch (all) {
    log.error("Unable to validate workflow on " + issue.key)
} finally {
     return result

I am receiving an error message of Unable to resolve class CRTransitionConditionStatus. I have tried adding the above script into the Script Root folder and pointing the condition to this script and it runs with no error however it always resolves to TRUE even when i specifically return FALSE.

What am i doing wrong? I have managed to port across all other scripts and JQL functions.


2 answers

0 votes
Henning Tietgens Community Champion Oct 26, 2014

It's the same for me, please watch/contribute here: https://jamieechlin.atlassian.net/browse/GRV-544

Thanks Henning - I will follow that issue from now.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,305 views 12 19
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you