Set JIRA approvers field from Insight Object attribute

This is a tutorial shows how to create an Insight Object with the same name as the Summary of the issue.

You can add more issue data by simply using the {{issue.xyz}} Mustache Variables a notation to access the issue data.

App: https://marketplace.atlassian.com/apps/1212137/insight-asset-management?hosting=cloud&tab=overview

Steps

  1. Create a new Action by clicking CREATE button
  2. Enter a name: Create Insight Object and click CREATE
  3. Select Method: POST and URL: <your_base_url>/rest/insight/1.0/object/create
    From the Insight REST API we can read to create on an object we need to call POST https://documentation.riada.io/display/INSSERV/Objects+-+REST
  4. Select Authentication method: Basic Auth, specify a user that has permission to manage insight schemas
  5. Add request headers, key: Content-Type with value application/json
  6. On the Body section add the following

    {
        "objectTypeId": 1,
        "attributes": [{
            "objectTypeAttributeId": 1,
            "objectAttributeValues": [{
                "value": "{{issue.summary}}"
            }]
        }]
    }
  7. Click Triggers tab
  8. Select ISSUE CREATED event
  9. On JQL Condition. When to execute the event(s) write Project = TESTB and to limit the trigger to the TESTB project
  10. Click SAVE
  11. (Optional) Click Test button, Issue Key needs to be provided and click Send, Then go 3 - View Execution Log.