Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
You can customize the gadget to be more user friendly, asking parameters more nicely. See more details here.
Note
titleImportant!
Warning

Looking for the documentation on the newest versions of Power Scripts for Jira 8 for Server/Data Center? Click here !

Another useful feature of JJupin is Power Scripts for Jira is the ability to randomly run SIL scripts on demand using randomly run SIL scripts on demand using the SIL Runner Gadget. This allows enables you to configure a list of scripts that can be run at any time directly from your Dashboard.

Note
titleImportant!

Bare in mind Note that scripts ran run this way do not have an issue context! . Therefore, constructs and keywords like '"key' " do not have a meaning here (they are undefined!). You need to first select the issues to work with, and prefix any standard variables with the issue key!

Configuration

The configuration screen is only available to JIRA Administrators and System Administrators and allows them to manage the list of available SIL scripts. They can add, configure security and delete scripts or edit the parameters of a runnable SIL script.

Image Removed

Image Removed

To add a script to the runner you must give it a name, description and select an already existing file containing the script.

The gadget also offers the ability to restrict script usage to specific users or groups by choosing a security option:

Image Removed    

          Public - the script will be available for any user

          Group - the script will be available only if the currently logged in user is a member of the specified group (will display a group picker)

          User - the script will be available only if the currently logged in user is the same as the specified one (will display a user picker)

  Project role - the script will available only if the currently logged in user is in a specific role on a specific project (will display a project picker)

Info
titleInfo

To edit the actual scripts, please use the SIL Manager.

Usage

Example

Image Removed

When you select a script from the list, its description will automatically be filled in below.

The Parameters field is used to pass values into your SIL program. To add a parameter click the Add Parameter button.

Note

Parameter names must be unique, otherwise the most recent definition will overwrite previous ones. This includes parameters with no name.

The parameters will be passed into the program using the argv variable. The values will be available using a construct like argv["parameter_name"] or argv[position]. For the above example, the number of rockets can be retrieved using argv["rockets"] or argv[2].

Tip
titleTip

 Parameters can be reordered using drag and drop.

Once you run the script, the program console will be displayed.

Image Removed

Tip

You can use the runnerLog routine to print info in the console as the program runs. Note that the console buffer is limited to 512 lines every ~0.5 sec and the console will only display the latest 512 lines.

Code Block
titleExample code
runnerLog("Preparing to start a war...");

runnerLog("Building tanks...");
runnerLog("Built " + argv["tanks"] + " tanks.");

runnerLog("Gathering infantry...");
runnerLog("Gathered " + argv["infantry"] + " brave men.");

runnerLog("Fueling rockets...");
runnerLog(argv["rockets"] + " ready.");

runnerLog("Dispatching orders...");
return "Good job! The world is now at war!";
Tip
titleTip

You can return as many values as you need, regardless of their type..

The following pages provide information about the SIL Runner Gadget:

Child pages (Children Display)