Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Why does the same Groovy script work differently?


Hello everyone!

I have a Groovy script, which if run from the console, it works fine, but if you put the same script as a file on the server and run the script from the file, the result is different.


package example

import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.onresolve.scriptrunner.runner.customisers.PluginModule

@WithPlugin(value = "com.riadalabs.jira.plugins.insight")

@PluginModule IQLFacade iqlFacade

iqlFacade.findObjects("objectType = Сотрудник")

Starting from the console

Image 1.png

Running as a script file

Image 2.png

Why is this happening?

Jira Service Management Version: 4.20.2

Version of the ScriptRunner plugin: 6.57.0

1 answer

1 accepted

0 votes
Answer accepted
Benjamin Community Leader Aug 29, 2022

Hi @Alexey Gusev,


Should be the same. Could be a bug. Would recommend contacting ScriptRunner support:



Hi @Benjamin 

Yes, it looks like a mistake.

Thanks for the advice, I'll try to write

Like Benjamin likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

An unofficial way to monitor a JSM mail handler for errors

...eturns true if any content is returned for the s...

718 views 3 20
Read article

Atlassian Community Events