You can create a Behaviour as follows:
- Navigate to ScriptRunner → Behaviours.
Upon opening the Behaviours page, you are presented with either a list of previously created Behaviours, or if you have not previously created any, you will see a landing screen.- Click Create Behaviour from the previously created list. You can also Edit or Delete your selected Behaviour via the Actions ellipsis on this page.
OR - Click Create Behaviour from the initial landing screen if none have been previously created.
- Enter a name in the Behaviour name field.
Image Modified
- Check the Enabled Status option, as required. When set to Enabled, the behaviour is active as soon as it has been saved.
- Select the project to associate with the behaviour from the Projects drop down list.
- Select the type of issue you wish to use from the Issue Types drop down list.
- Click the Add Field button to choose fields you wish to include in the behaviour. You will see the Add Behaviour Field pop up window:
Image Added
- Select the field from the Affected Field drop down list and click Next. You will now see the following screen:
Image Added
- Enable the Events to be either OnLoad or OnChange, as required.
- Edit the code within the Script box, as required. You can also select an example script from the Examples drop down list.
- Click Save to confirm your configurations. You can also click the Back button to go back through your steps, or you can Cancel.