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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,772 views 11 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot