"ScriptRunner Script" type Validator for Create Transition in Workflow not working

Cash Coyne
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.
September 1, 2022

I’m trying to do a Validator of type “ScriptRunner Script” in Jira Cloud

I’ve created a validator that uses this JQL:

(issuetype != Epic and "Epic Link" is not EMPTY) or issuetype = Epic

But when I try to create an Epic, I get this:

The following validator rejected the transition: ScriptRunner Script. The configuration is invalid. Contact the app vendor that provided this workflow element.

What am I doing wrong?

The goal is to require an Epic link field for all issues that are NOT an IssueType that is Epic.   Is it my JQL that is wrong? The JQL works for searching issues.  Is there a better way to do this type of validation?

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 1, 2022

That looks like a Server/DC chunk of code for a validator, not a Cloud expression.

Valdators on Cloud are totally different to Server/DC, see https://docs.adaptavist.com/sfjcl/how-do-workflow-validators-work-inside-of-scriptrunner-for-jira-cloud-48300315.html for how to start writing them.

Cash Coyne
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.
September 6, 2022

Got it.

This expression worked for me:

(issue.epic != null) || issue.isEpic

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events