Forums

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

how to execute groovy script by another script

laumain jerome July 13, 2018

Hi,

I would like to execute 3 scripts without going through an event trigger, or by the services
what is the scriptrunner function that would allow me to do this?
I tested something like this:
def script = "/path/to/the/script.groovy"
script.execute ()
but it just returns me
"java.lang.UNIXProcess@3ba73ab3" without executing the code.
Thank you for your answers.

1 answer

1 accepted

1 vote
Answer accepted
Mark Markov
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.
July 13, 2018 edited

Hello @laumain jerome

You can create classes with methods, place it in scriptroot directory and use it in different scripts.

Please check this article

https://community.atlassian.com/t5/Jira-articles/Work-with-your-Jira-plugin-from-Adaptivist-ScriptRunner-or-how/ba-p/719050

laumain jerome July 13, 2018

thanks a lot Mark!

i try this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events