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

ScriptRunner for JIRA & Confluence vs. General ScriptRunner

Atlassianist June 3, 2023

Hallo, 

we are searching for solutions how to automata our complex workflows:

Example:
1. a department creates a file on the file server.
2. the content of the file is checked and the automation creates a JIRA ticket and changes a certain confluence page.
3. The JIRA ticket is assigned to a specific user as "editor" and another user receives an email about the change to the Confluence page.
4. When the editor has edited the JIRA ticket, a status change is made, which results in certain AD groups being created on the domain controller and permissions being granted.

Some steps could be made manually via REST or normal JIRA Automate Plugin, I see however that the entire "chain" of steps of this example or even more complex uses cases can be done only with ScriptRunner. 

 Some additionan requirements are

that the maintenance of the scripts should be as easy as possible and multi-tenancy should also be possible. 

So a normal Team Lead must be able to execute the scripts without having right on the AD.

 

***

 

I think the general Limits of the following options are:

 

REST:

we can trigger some works in Atlassian apps it is however not possible to access external objects /AD, FileServer, Firewall/ via REST from JIRA / Confluence.

It is difficult to maintain the scripts efficiently. Work via REST is not multi-tenant-ready. More or less only the Atlassian Admins can work with it. 

 

AUTOMATE (PLUGIN)

we can trigger some works in Atlassian apps it is however not possible to access external objects /AD, FileServer, Firewall/ via REST from JIRA / Confluence.

 

SCRIPTRUNNER FOR JIRA & CONFLUENCE

We can automate pretty much everything inside JIRA and inside Confluence and bidirection in both apps. 

It is partly possible to call an SC-job by an external Powershell-Script and it is partly possible to operate with external entities like AD or FileServer.

This solution would be easy to maintain and would be multi-tenant-ready if the user has the requested roles ...

 

GENERAL SCRIPTRUNNER

 This solution is easy to maintain can execute scripts in windows and linux networks and can do the jobs at other devices as well, if they can be reached via PowerShell. 

This ScriptRunner has however no atlassian-optimised scripts and everything have to be developed manually. 

***

Do I understand correctly the limits of the different options?

 

My questions are:

#1 is Scriptrunner for JIRA is able to operate outside of the atlassian products and start external powershell scripts if necessary?

#2 is it possible to trigger an jira-internal scriptRunner task from "outside"? I mean, I start a Powershell-Script in Windows and an SR-Script in JIRA is called / loaded. It is possible?

#3 Is any option to use the normal general ScriptRunner to operate in JIRA / Confluence or we have to use ScriptRunner for JIRA / Confluence (of Adaptavist) If we would like to use some JIRA Features without development of months ...

 

Thank you very much for your feedbacks. 

 

Gr. I. 

 

 

 

 

 

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Peter-Dave Sheehan
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.
June 5, 2023

I'm not sure what distinction you are making between "general scriptrunner" and scriptrunner for jira/confluence. The only scriptrunner I'm aware of is the jira/confluence plugin by adaptavist that allow you to create groovy scripts to interact with the Java API of the underlying app.

But to answer your questions:

#1  - all server/DC version of scriptrunner can trigger any command on the host operating system (assuming the user that owns the java process has permission) including launching powershell scripts.

 

#2 - Yes you can execute scripts in the scriptrunner console remotely using curl (or equivalent) . But in most cases, I prefer to expose custom functionality using a scriptrunner REST API Endpoint and calling that rather than remotely submitting a script to the console.

#3 - See above. I don't know what you mean by "General Scriptrunner".

Atlassianist June 9, 2023

Thank you very much for your reply.

With "general Scriptrunner" I have meant ScriptRunner for PowerShell (scriptrunner.com)

Regards

Istvan

Peter-Dave Sheehan
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.
June 9, 2023

Ah... let's call this "powershell scriptrunner".

"powershell scriptrunner" and "groovy scriptrunner" are two completely unrelated technologies built/managed by different companies.

powershell scriptrunner, native powershell, or any other client-level scripting tool (e.g. bash on linux) can only manage atlassian web apps via whatever REST endpoint those web apps can offer.

Whereas groovy scriptrunner runs INSIDE the webapp JVM and has access to all the internal Java APIs of those webapps. 

Some of the capabilities of groovy script runner include:

  • Extend the app UI
  • Tie into the apps event system (listtener) to run script based on those events
  • Run scripts based on a schedule
  • Create and expose new REST API endpoint to run arbitrary scripts to return data or trigger some actions
  • Make http request to other systems or tools
  • Trigger OS-level commands
Atlassianist June 12, 2023

Hello Peter-Dave, Thank you very much :-)

Atlassianist June 18, 2023

Hallo Peter-Dave, 

some more technical questions. 

#1 if we invest in "Groovy" ScriptRunner can it be triggered via REST? 

So I mean, If I have an ScriptRunner Task in JIRA can it be started via an external Script?

#2 If we do not Invest in "Groovy" ScriptRunner we have the option to work manually via REST (Python with Atlassian Package or Postman or Windows onboard Powershell) or we choose the highend version and pay for ScriptRunner Powershell.

Do you have any experiences with developing applications for REST? Would you prefer Python oder PowerShell?  

#3 Do you think that all these cannotbe made via REST?

  • Extend the app UI
  • Tie into the apps event system (listtener) to run script based on those events
  • Run scripts based on a schedule
  • Create and expose new REST API endpoint to run arbitrary scripts to return data or trigger some actions
  • Make http request to other systems or tools
  • Trigger OS-level commands

 

Thank you very much for your reply. 

 

I.

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 Leaders.
June 18, 2023

Scriptrunner has a feature that allows you to write scripts inside Jira that work as REST endpoints.

So yes, if you write REST endpoints to do what you need, you can make calls from the outside to trigger them.

You cannot alter the UI from outside the application, you have to configure Scriptrunner internally.  All the other things you list are possible inside Jira, or SR has some functions for them built-in, and you can always write your own scripts.

Atlassianist June 18, 2023

Hi Nic, 

thank you very much.

The possibilities of ScriptRunner for JIRA (Your Product) seem pretty limitless within JIRA ... :-)

How do you see the USP of your products? What kind of JIRA internals couldn´t be called via other REST-compatible Tools e.g. Python Scripts or PowerShell ScriptRunner. 

#1 I think one of the advantages is simply the development time. With your product most of the JIRA internals can be reached directly. 

#2 Developing custom REST Endpoints is a further advantage ...

Where are the general limits of external scripts?

Thank you very much for your reply.

Best regards

I.

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 Leaders.
June 20, 2023

>What kind of JIRA internals couldn´t be called via other REST-compatible Tools 

and

>Where are the general limits of external scripts

They can only make calls to the REST API that are exposed by it.  Scriptrunner works inside Jira, so it has access to everything.

TAGS
AUG Leaders

Atlassian Community Events