Skip to main content
Skip table of contents

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:

image-20240913-155056.png

Trigger: Field Value Changed

When the Application single select custom field is updated.

image-20240913-155819.png

Action: Send Web Request

Retrieve the Target Environments Golive custom field option ID(s) that corresponds to the selected Application and the “Production” category.

image-20240913-155839.png

Web request URL:

TYPESCRIPT
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:

CODE
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.

image-20240913-161032.png

Additional fields:

JSON
{
    "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

JSON
{
    "fields": {
        "Environment(s)": ["5", "6"]
    }
}


More examples


Questions?

If you need help with your Golive-Automation for Jira integration, feel free to contact us.

JavaScript errors detected

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

If this problem persists, please contact our support.