Select an Environment Based on Another Field
This guide covers a specific use case where Jira Automation is configured to automatically populate the Target Environments field whenever the Application field is updated.
Requirements
Golive Cloud must be installed on Jira Cloud.
Important
This example is not compatible with Jira Data Center.
Configuration Steps
This is the setup in Jira Automation for Jira Cloud:

Automation Configuration
Step 1: Set the Trigger
Trigger: Field Value Changed.
This automation is triggered whenever the Application custom field (single-select) is updated.

Step 2: Send Web Request
Retrieve the option IDs for the Target Environments field that match the updated Application field and the Production category.

Web request URL:
https://golive.apwide.net/api/customfield/environment/selectable?projectKey=CRM&customfieldName=Target%20Environments&applicationName={{issue.Application.value.urlEncode}}&categoryName=Production
Info
Update projectKey
, customfieldName
, categoryName
, and applicationName
parameters as needed. Be sure to encode your Web request URL if it contains spaces or special characters.
Headers:
api-key: <your-token>
accept: application/json
Info
To learn more about generating a Golive API Token, refer to the Rest API documentation.
To learn more about the Golive Custom Field API, refer to the Environment Custom Field Rest API documentation.
Step 3: Edit the Issue
Use the option IDs retrieved from the web request to update the Target Environments field.

Additional fields:
{
"fields": {
"Target Environments": [{{webResponses.last.body.items.id}}]
}
}
Need Assistance?
For support with integrating Golive and Jira Automation, reach out to our Customer Portal.