Setting up a dev environment for ScriptRunner for JIRA

Anna Protopapa April 9, 2017

I start using Adatpavist ScriptRunner for JIRA and I have to install some software

https://scriptrunner.adaptavist.com/latest/jira/DevEnvironment.html

Do I have to instal them in the server or in my computer?

Thank you

1 answer

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2017

It's generally a good idea to develop on a local system, then when you've got your scripts right, promote them over to your test and live server.

The basic installations listed in the article are all to go on the machine on which you are going to be doing the development.

Anna Protopapa April 9, 2017

We have bought the starter kid with 10 users and I am trying to make a proof of concept. The machine on which you are going to be doing the development (and as the instructions installed Git, IntelliJ Community Edition, Atlassian Plugin SDK and Java SE Development Kit 8 (JDK 8)) must be my pc or the server I had installed the jira? 

JamieA
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.
April 10, 2017

On your PC

Tim Bonney May 30, 2023

So there's no way to do add/create a test or dev environment within an existing environment, so that all of the project types, issue types, etc. are consistent?

I had found this link earlier today https://docs.adaptavist.com/sr4js/latest/training/tutorials/before-you-start, referencing how to create a test project whilst importing test content, but the screens don't look like mine do, so I was afraid to proceed. This tutorial says that it is based on Jira Service Management version 8.3.0, but since we're on Jira Cloud, we're at the latest version. I am not sure if that's why the options look different, but whereas in the tutorial it shows that the older version provided an option to create a new project with sample data, it does not appear to me that this options still exists in the current version. Does anyone know?

Please see comparison of screen shots here...

From above link (older v 8.3.0):

ScreenShot_090.png

My Current Version:

ScreenShot_089.pngDoes anyone know if this functionality was deprecated in more recent releases since 8.3.0? My planned approach was going to be to create a test project and share the settings with an existing project so that I know  I would be testing apples to apples. But, it does not appear that this is an option. Thanks.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2023

So, the principle of separating "dev" (and "test") from "production" still stands - Scriptrunner has no way to know whether a script is in dev/test or production within the same system, because Jira does not have any concept of it either.

You can set up test projects in a production system and lock down or configure your scripts to only run for test, but this is a completely human process, and requires a thorough understanding of what might happen and how to ringfence your testing within the production system.  And a clear understanding of the risk of messing up your production system (You may sense that I've been burned by this before)

Don't.  Keep dev, test, play and demo systems out of production.  Create a copy and mess with that (just remember to decouple it so it does not send emails or try to connect to other production systems)

 

For the second part of your question, it's a bit of a fuzzy one.  SR for Server/DC and SR for Cloud are totally different products under the hood.  They share a lot of ideals but very little, if any, code.

So, if you're coding SR for Cloud, don't bother looking at the DC docs; they're not a lot of use.

But with my Adaptavist marketeer hat and my "ooh, new interesting problem" one too, please

  • have a rummage through https://library.adaptavist.com for any scripts that might help (hitting the cloud tab of course)
  • yell at one of our Customer Success people (me, for example)
  • raise a support request (Adaptavist support is not just for when it goes bang, we want to help people write new things, as well as migrate to Cloud and fix the bangs)
Tim Bonney May 31, 2023

Thank you for your input Nic. I appreciate the feedback and direction.

Suggest an answer

Log in or Sign up to answer