Skip to main content
Skip table of contents

Autofill Jira Versions

Use Case

When testing an application and reporting bugs, manually entering detailed information for each bug can become tedious. For example, even though the Affects Version(s) field is entirely dependent on the testing environment, you still need to manually fill in both the Affects Version(s) and Environment fields. This repetitive task is prone to errors and can be quite frustrating.

Fortunately, Golive can automate this process. By leveraging resources likeTrack Application Deployments and Environment Custom Fields, Golive automatically determines the correct deployed version and populates the Affects Version(s) field in Jira for you.


First, configure an custom field to link your Jira issues with Golive environments. In the example below, we've named this custom field Environment(s).

Once you set the Environment(s) custom field (1), the Affects Version/s field (2) is automatically set:

Have you managed to reproduce the bug on several environments? Select them all and all versions will be prefilled accordingly:

Selecting several environments autofill several versions!

How does this work?




For this use case, we are using the ScriptRunner Jira App.

  1. In ScriptRunner, create a new Behaviour.

  2. where you want to automate version selection (e.g., Bug reports) :

  1. Within the newly created Behavior, add a server-side script to interact with your Golive custom field:

import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.apwide.env.api.GoliveAccessor

GoliveAccessor goliveAccessor

// Get the list of Environments' IDs from the Environment CF
List<String> envIds = getFieldByName("Environment(s)")?.getValue() ?: []

// Get the list of versions deployed on selected Environments
def deployedVersionNames = envIds
    .collect { envId -> goliveAccessor.golive().environments.getById(envId).deployment?.versionName }
    .findAll { versionName -> versionName != null }

// Update the "Affects Version/s" field with the deployed versions


Setting up Jira can be complex for beginners. That's why we offer free assistance with configuration. If you need help, please to contact us contact us.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.