Problems using JQL validations launched by a groovy script when creating a new issue

I've 2 projects named ENT and REQ.

I need to create issues in REQ project from both ENT and REQ project.

Also, I need to prevent to create issues in REQ project with a duplicate value for "Código del requisito" customfield (cf[19800]).

My configuration:

Project ENT - Transition: "TOMREQ: Crear requisito" configuration:



As you can see, a script groovy is invoked. In this script a new issue is created in REQ project using:

Issue newIssue = issueManager.createIssueObject(admin, newMutableIssue);

Project REQ - Transition: "Create" configuration:




My Problem:

NOTE: In "TOMREQ: Crear requisito" I repeat the validation only for giving feedback to the users in case of bugs (for showing the error message if the user put a repeated "Código del requisito" value).


  1. If I create a new issue in REQ project, the JQL validation works fine.
  2. If I create a new issue in ENT project, the JQL validation provoque an error and no issue is created in REQ project.
  3. If I delete the JQL validation in REQ project, I can create a new issue in REQ project.


I can't delete the JQL validation from REQ project because users need to create issues in REQ project from both ENT and REQ project.


What can I do?


The error in the log is:

The script failed : javax.script.ScriptException: javax.script.ScriptException: com.atlassian.jira.exception.CreateException: com.atlassian.jira.workflow.WorkflowException: INVALID ARGUMENT ON JQL QUERY AT "VALIDATION ON JQL QUERY": "project=%{00018} AND cf[19800]~"%{19800}"" : Source GenericValue can not be null.



I'm using: JIRA 6.1.7 and Script Runner 2.1.16


2 answers

0 vote

This is not a script runner question... at least the error message you have is not produced by script runner.

Thanks Jamie, I thougth the cause was to link groovy script wiht JQL validation....I keep searching the cause.... Regards

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted 9 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

32 views 0 5
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