Troubleshooting Behaviours

Cannot Add Behaviours

The Behaviours page in ScriptRunner is failing to load information, blocking you from adding behaviours to your Jira instance. Try the steps below before contacting ScriptRunner support.

Behaviours module disabled

One cause of this issue may be that the behaviours module has been disabled. Follow the steps below to check.

  1. From the Administration page, navigate to Manage Apps under Atlassian Marketplace.

  2. Locate ScriptRunner and expand the section.

  3. Click XXX of XXX modules enabled.

    Image of location of modules
  4. From the modules list, find Behaviour admin assets (bh-admin) and check if disabled (greyed out with Disabled in red).

  5. If disabled, click Enable.

Customized HTML banner containing JavaScript

Check your browser's Developer Tools Console Log. If you are getting the following error, it may be caused by a customized HTML banner containing JavaScript:

TypeError: $ is not a function

This error causes the same issue with post-functions, validators and conditions.

  1. Navigate to the HTML banner.
  2. Locate the following and remove it from the HTML file (either by deleting or commenting out).

    jQuery.noConflict( );

    For more information on why this line causes errors see this explanation of jQuery.noConflict().

  3. Clear your browser cache and reload the Behaviours page.

Custom HTML/JavaScript in custom field descriptions no longer work in Jira 8.7

Problem

You have recently upgraded to Jira 8.7, and behaviours that set custom field description values are not working correctly on custom fields, or you're seeing raw code in the field's description.

Solution

Jira 8.7 automatically disables the feature labelled as "Enable HTML in custom field descriptions and list item values". If your custom HTML or JavaScript just shows as text, where your fields description should show, and your custom code is not being executed, you must re-enable that feature. Alternatively, you can load your custom JavaScript in a different way, for example, using our web resources feature.

Atlassian bug reference: JRASERVER-38866

The bug is referenced in the release notes for Jira 8.7.

On this page