ScriptRunner Portal Widget

How to implement a ScriptRunner Action on your website

The ScriptRunner portal offers the possibility to display a specific action, defined by the ID
of the action, as a detached element. This view can then be integrated into any website via an iFrame. The login procedure as well as the handling of licenses does not differ from the
usual login at the portal.

Integration

The URI required for the integration can be generated directly at the desired action in the portal with the Widget Link button.

Example URI for integrating an Action with the ID 25:

http://<ScriptRunnerHost>/scriptrunner/portal/#/widget/25

This URI can now be used for embedding in an iFrame:

<div class="container">
    <div class="row justify-content-md-center">
        <div class="col-md-6">
            <iframe
                src="http://<ScriptRunnerHost>/scriptrunner/portal/#/widget/25"
​​​​​​​                style="width:100%;height:100%"
                frameBorder="0">
            </iframe>
        </div>
    </div>
</div>

URI Parameter

To control the included action, various parameters can be passed in the URI. Standard parameters are:

  • nodescription
    The description of the Action is hidden
  • noname
    The name of the Action is hidden
  • lng
    The language of the Action is passed (en/de)

Example with all three standard parameters:

http://[ScriptRunnerHost]/scriptrunner/portal/#/widget/25?nodescription=true&noname=true&lng=en

In addition, it is possible to assign values to simple string parameters of the action. This is currently only possible with string parameters that result in a TextBox. Parameters with the following structure must be included in the URI:

param_[PARAM_NAME]=[PARAM_VALUE]

Example with the parameter "test" is preassigned with the value "Hello":

http://[ScriptRunnerHost]/scriptrunner/portal/#/widget/25?param_test=Hello

Adjustments

The action displayed in the portal widget can be customized via the widget.css file (found in the installation folder of the ScriptRunner portal), independently of the display in the portal.
For example, the colours of elements can be changed and adapted to the surrounding website. Some example classes are listed in the widget.css file.