Jira Automation
You can use Jira Automation to update Golive Environment Custom Fields.
Select an Environment based on another field
In this use case, we automatically select the relevant production environment(s) in the Target Environments
field, when updating to the application in the Application
field.
Here is the configuration in Automation for Jira Cloud:
Trigger: Field Value Changed
When the Application
single select custom field is updated.
Action: Send Web Request
Retrieve the Target Environments
Golive custom field option ID(s) that corresponds to the selected Application 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
Update the projectKey
, customfieldName
, categoryName
and applicationName
parameters if needed. Make sure you encode your Web request URL if it contains spaces or special characters.
Headers:
api-key: <your-token>
accept: application/json
Learn more about generating a Golive API token: Rest API
Learn more about the Golive custom field API: Environment Custom Field Rest API
Action: Edit Issue
Update the Target Environments
field with the corresponding options.
Additional fields:
{
"fields": {
"Target Environments": [{{webResponses.last.body.items.id}}]
}
}
Select an Environment using the Option ID
Here is the configuration in Automation for Jira:
WHEN the drop-down custom field "Promotion Path" is changed
IF the value of the "Promotion Path" is "Production Fix"
THEN the "Environment(s)" custom field is updated with the Environments "eCommerce Integration 1" (option id=5) and "eCommerce Staging" (option id=6)
Option id are different from Environment id!
Learn how to retrieve the Option ids you can use to set your environment custom fields: Environment Custom Field Rest API
{
"fields": {
"Environment(s)": ["5", "6"]
}
}
More examples
Questions?
If you need help with your Golive-Automation for Jira integration, feel free to contact us.