The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

"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 Champions.
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Nic Brough -Adaptavist-
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 Champions.
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 Champions.
September 6, 2022

Got it.

This expression worked for me:

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

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events