Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Why does the same Groovy script work differently?

Edited

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.

Script

package example

import com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade
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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 29, 2022

Hi @Alexey Gusev,

 

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

 

https://productsupport.adaptavist.com/servicedesk/customer/portal/2/user/login?destination=portal%2F2

 

-Ben 

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
TAGS
AUG Leaders

Atlassian Community Events