How to fetch data from Mindville´s Insight

The Issue to Page supports the Insight - Asset Management by Mindfield - System requirements minimum version 1.5

This How To depends on some deeper knowledge of Mindfield´s Insight App, the JSON view and the usage of REST.

Like the usual standard variables, the Insight variables can be used when creating the page title bar or in the labels

Only the following Insight custom fields are supported

  • Insight Object/s
  • Insight Readonly Object/s
  • Insight Referenced Object (single)
  • Insight Referenced Object (multiple)
Concept

Gliffy Macro Error

Cannot find a diagram with these parameters:

  • Name: Insight gliffy


Fetch information from Insight

Note

The examples mentioned here are explained on the following page → How to fetch the JSON Object

With this we can start building our "attribute chain". You can chain up attribute name after attribute name to get a value deeper from the JSON.


Example 1 - plain value

If you just need the values as shown in JIRA you can access this information like any other custom field, as mentioned in → Variables

//$issue.customfield_<id> Make sure to replace <id> with the ID of the custom field that contains the Insight objects. 
$issue.customfield_11818

Here is a guide by Atlassian how to locate the ID of the field you need.


Example 2 - retrieve simple attributes

If you want to include the Insight object key (e.g. RCI-12) into your Confluence page, you can insert the following variable:

// $issue.customfield_<id>.objectKey
$issue.customfield_11818.objectkey


Example 3 - get nested attribute values

If you want to include the Insight object type (e.g. Notebook) into your Confluence page, you can insert the following variable:

//$issue.customfield_<id>.objectType.name
$issue.customfield_11818.objectType.name

Example 4 - get nested attribute values

If you want to include a value that is nested in the Insight object type (e.g. T440P ) into your Confluence page, you can insert the following variables:

//$issue.customfield_<id>.attributes_<id>.objectAttributeValues.displayValue
$issue.customfield_11818.attributes_406.objectAttributeValues.displayValue
$issue.customfield_11818.attributes_409.objectAttributeValues.displayValue

Example 5 - get a related objects name

If you want to include the name of Insight objects related to current Insight object (e.g. Lenovo) into your Confluence page, you can insert the following variable:

//$issue.customfield_<id>.attributes_<id>.objectAttributeValues.displayValue
$issue.customfield_11818.attributes_407.objectAttributeValues.displayValue

Since the "attribute chains" get rather long, instead of starting the macro with $, simply write the full chain, select it completely.

Create a "New variable" from the confluence toolbar