Skip to main content
Skip table of contents

Populate Jira Approvers from Golive Environment Configuration

In this guide, you’ll learn how to use Jira Automation and Golive to automatically populate the Approvers field in Jira work items using approvers defined at the Environment level in Golive.

This setup retrieves approver names stored as a Golive Environment Attribute and maps them to Jira users, ensuring that bookings, changes, or blackouts always include the correct approvers without manual input.


Requirements

  • Golive Cloud installed on Jira Cloud.

  • Approvers attribute configured on Golive Environments:

    • Markdown type.

    • Jira usernames separated by commas.

  • Admin permissions to create or modify Jira Automation rules.

  • A Jira work item type for bookings / changes / blackouts with:

    • Environments field.

    • Approvers field available on the screen.


Configuration Overview

You'll configure one Jira Automation rule that performs the following actions when a work item is created:

  1. Retrieves the selected Environment ID from the issue.

  2. Fetches the list of Approvers from Golive.

  3. Splits the Approver List into individual values.

  4. Resolves each approver to a Jira User ID.

  5. Adds each user to the Jira Approvers field

  6. Logs values for traceability.

  7. Adds a comment for verification.

ZZ_approvers_automation.png

Jira Automation rule example


Configuration Steps

Step 1: Define the Trigger

Trigger: Work item created

Configure the rule to trigger on creation of the relevant work item type.
You can add additional conditions if required.

image-20251211-130303.png

Step 2: Send Web Request – Get Selected Environment ID

image-20251211-130936.png

Web request URL:

CODE
https://golive.apwide.net/api/customfield/environment/selected?issueKey={{triggerissue.key}}&customfieldId=customfield_10487

HTTP method: GET

Headers:

Important

  • Replace customfield_10487 with the ID of your Environment custom field.

  • Enable Delay execution of subsequent rule actions until response is received.

Step 3: Create Variable – Environment ID

image-20251211-131627.png

Variable name: EnvID

Smart value:

CODE
{{webresponse.body.items.id}}

Step 4: Send Web Request – Get Approvers from Golive

This request retrieves Environment Attributes, including the Approvers attribute.

image-20251211-131941.png

Web request URL:

CODE
https://golive.apwide.net/api/environments/search/paginated?environmentId={{EnvID}}

HTTP method: GET

Headers:

Important
Enable Delay execution of subsequent rule actions until response is received.

Step 5: Create Variable – Approvers List

image-20251211-132141.png

Variable name: ApproversList

Smart value:

CODE
{{webResponse.body.environments.attributes.Approvers}}

Step 6: Log Action – Approvers List

Log the raw approvers list to the audit log for troubleshooting and verification.

image-20251211-133615.png

Step 7: Branch Rule – Iterate Through Approvers

Use Advanced branching to process each approver individually.

image-20251211-133745.png

Smart value:

CODE
{{ApproversList.split(",").trim()}}

Variable name: Approver

Imporant
Ensure the separator matches the format used in Golive (comma in this example).

Step 8: Log Action – Current Approver

Log each approver value as it is processed.

image-20251211-134032.png

Step 9: Send Web Request – Resolve Jira User ID

This request resolves the approver name to a Jira user account ID.

image-20251211-134310.png

Web request URL:

CODE
https://YOUR_JIRA_NAME_HERE.atlassian.net/rest/api/3/user/search?query={{Approver.urlEncode}}&maxResults=1

HTTP method: GET

Headers:

  • authorization: Basic (Base64-encoded email and API token)

Important
Enable Delay execution of subsequent rule actions until response is received.

Step 10: Create Variable – Approver ID

image-20251211-134843.png

Variable name: ApproverID

Smart value:

CODE
{{webresponse.body.accountId}}

Step 11: Log Action – Approver ID

Log the resolved Jira user ID for audit and debugging purposes.

image-20251211-135032.png

Step 12: Edit Work Item – Add Approver

Add the resolved user to the Approvers field.

Use More options and update the custom field ID to match your Jira instance.

image-20251211-140550.png

You can specify what changes you would like to put into selected fields (e.g. description as in our example) and use ‘More options’ for adding users to ‘Approvers’ field. Make sure to update custom field ID (10003 in our example) to match the ID of ‘Approvers’ field in your Jira instance.

Additional fields:

CODE
{
   "update": {
      "customfield_10003": [
      {
            "add": {"id":"{{ApproverID}}"}
         }
      ]
   }
}

Step 13: Re-fetch Work Item Data

Re-fetch the issue to ensure the Approvers field is updated before evaluating conditions.

image-20251211-141119.png

Step 14: Condition – Prevent Duplicate Entries

This condition allows multiple approvers to be added while avoiding duplicates.

image-20251211-141516.png

First value:

CODE
{{issue.customfield_10003}}

Second value:

CODE
{{ApproverID}}

Condition: Does not contain.

Step 15: Edit Work Item – Add Additional Approver

If the condition passes, add the user to the Approvers field again using the same configuration as Step 12.

image-20251211-141822.png

Use More options for adding users to the Approvers field. Make sure to update Custom Field ID (10003 in our example) to match the ID of Approvers field in your Jira instance.

Additional fields:

CODE
{
   "update": {
      "customfield_10003": [
      {
            "add": {"id":"{{ApproverID}}"}
         }
      ]
   }
}

Step 16: Add Comment to Work Item

Add a comment containing the original approvers list from Golive.

This allows quick verification that all approvers were successfully mapped and added.

image-20251211-142128.png

JavaScript errors detected

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

If this problem persists, please contact our support.