Vendors API Example Plugin
This example demonstrates how to integrate a Jira custom field with the Behaviours API. You can download the source code from GitHub. You'll also need the latest version of ScriptRunner for Jira (8.14.0 or above) for the integration to work.
There are three stages to working with this example plugin:
Compile the example plugin
If the above steps do not work, do npm install and npm run build in the /frontend folder before you run atlas-mvn package at the root of the project. This steps makes sure the latest frontend code is bundled in the .jar.
Configure a custom field
Test
When our custom field is visible on the Issue Create modal, we can configure Behaviours to test the implementation.
- Navigate to the ScriptRunner Behaviours page and configure the new Behaviour.
- Map the Behaviour to All Issue Projects and All Issue Types.
Testing the setting value
To test the setting field value, we'll use an Initialiser script.
Testing the getting value
To test the getting value, we'll get the value from our custom field and set it as an issue description when Summary is edited. To achieve this, we need to add the Summary field to our Behaviour and key in a script:
Testing handling user changes
Test handling user change by adding a Behaviour to the Vendors API field:
Testing read-only status
Test the read-only status by changing the script for the Summary field in the Test getting value Behaviour: