This documentation is for Insight for Jira Cloud only.



Insight post-functions allow you to automatically set or retrieve the values of Insight objects or attributes when a particular transition is triggered in a Jira workflow. In this section, we will discuss the post-functions available in Insight for Jira Cloud.

Creating an Insight post-function

You can create an Insight post-function by selecting Insight Post-Function when adding a new post-function to a workflow. Post-functions are functions that run automatically when a particular transition in a workflow is triggered.

Insight post-functions allow you to set or retrieve the values of Insight objects or attributes when moving through a Jira workflow. There are two post-functions currently available in Insight for Jira Cloud - one allows you to set the value of an object attribute with a predefined value, and the other allows you to set a Jira field based on the attribute of a linked asset.

 How to use the 'set the value of an object attribute with a predefined value ' post-function...

As the name suggests, this post function is used to set an object attribute with a predefined value.

For example, suppose that you have a schema that stores the data for employees in an organisation. You have a Phone Models object type which has an attribute Status (Possible values for this attribute are Requested, In Service, Closed).

Now, let's say that a new employee requests for a new phone by creating an issue in our Employee onboarding Jira project. There is an Insight field Phone Model on every issue screen of this project. The Employee selects a phone from this field.

Once the employee creates this issue, this post function helps you to set the Status attribute of the Phone Model object to the value Requested. 

How to configure 'Set the value of an object attribute with a predefined value' post function

You need to be logged in with a Jira Administrator's role to add a post function on a transition in a workflow.

  1. Click Projects in the top navigation bar and select your project.
  2. Click Project Settings, and then Workflows.
  3. At the far right, click the pencil icon to edit the workflow.
  4. At top, select the view to Diagram/Text.
  5. Click the transition that you wish to add a post-function to, and select Post functions at right.
  6. Under the Post Functions tab click Add post function to create a new post function. This will open a list of all post functions in Jira.
  7. Select Insight Post Function option from this list.
  8. You must now select the Set the value of an object attribute to a predefined value from Insight Post-Function dropdown as shown below. This is a mandatory field.

    Once this is done, you should fill in the following relevant parameters for this post function. The fields are shown in the screenshot below.

    1. Source Asset Field - Specify the Asset field from where object attribute should be fetched. This is a mandatory field. 
    2.  Insight Attribute name - Specify the name of the attribute where to fetch the value/s from. This is a mandatory field. Remember that this is case sensitive and has to exactly match with the attribute name from the respective Insight schema.
    3. Value(s) to set 

      1. Specify values/s to be set to the attribute that you selected in step (b).

      2. If no value is set to this field, then the attribute will be set to an empty value. This essentially means that the previous value set to this attribute will be lost.

      3. You can specify multiple values one after the other. Fill in a value, press Enter key. Fill in the next value and press the Enter key again. Repeat this for all values that you want to fill in. Please note that this will work only for those attribute types for whom the cardinality is more than 1.


  9. Click Add to create the post function.

  10. Make sure that the order of steps for the post function is correctly set up.


  11. After this, publish the Workflow. The post function will now be available to run on the selected transition in the workflow.

 How to set a Jira field with the attribute from a selected object...

As the name suggests, this post function is used to set a Jira field with the value of an attribute from an object.

For example, suppose that you have a schema that stores the data for employees in an organisation. You have an "Employee" object type which has an attribute "Employee Start Date".

Now for your Employee onboarding Jira project, let's say you have an Employee Insight asset field on the issue screens which maps to the Employee object type from your Insight schema. You also have another Jira field named Employee Start Date on the same screen.

This post function will help you to retrieve the Employee Start Date attribute's value from the Employee asset field and assign it to the Employee Start Date field.

How to configure 'Set a Jira field with the attribute value from a selected object' post function

You need to be logged in with a Jira Administrator's role to add a post function on a transition in a workflow.

  1. Click Projects in the top navigation bar and select your project.
  2. Click Project Settings, and then Workflows.
  3. At the far right, click the pencil icon to edit the workflow.
  4. At top, select the view to Diagram/Text.
  5. Click the transition that you wish to add a post-function to, and select Post functions at right.
  6. Under the Post Functions tab click Add post function to create a new post function. This will open a list of all post functions in Jira.
  7. Select Insight Post Function option from this list.
  8. You must now select the Set a Jira field with the attribute value from a selected object from Insight Post-Function dropdown as shown below. This is a mandatory field.

    Once this is done, you should fill in the following relevant parameters for this post function. The fields are shown in the screenshot below.

    1. Source Asset Field - Specify the Asset field from where object attribute should be fetched. This is a mandatory field. 
    2. Insight Attribute name - Specify the name of the attribute where to fetch the value/s from. This is a mandatory field. Remember that this is case sensitive and has to exactly match with the attribute name from the respective Insight schema.
    3. Target field - Specify the target Jira field (custom, non-custom) where the value of the object attribute should be stored. This is a mandatory field. Note that the field that you select must be configured to be present on the Edit Issue screen of your project, else this post function will not work.
    4. Notify checkbox - If you select this, all watchers on the issue will be notified once the execution of this post function makes changes to the issue.

  9.  Click Add to create the post-function.
  10. After this, publish the Workflow. The post function will now be available to run on the selected transition in the workflow. 

The supported target fields for this post function to work are:

  • Any field of type Jira User (multi or single)  - By convention, this is always of the User object type attribute. However, this could be of the text type as well.

  • Any field of type Text (single- or multi-line) - When you choose a field of text type, make sure you consider that, not all kind of values for all attribute types can be translated well to a text value. E.g, For Status attribute type, suppose one of the values is:  (id: 1, value: "IN PROGRESS"), then the id is assigned to the target text field. In that case, the target field may not display a meaningful value as you want.

  • Any field of type Jira Group (multi or single) - By convention, this is always of the Group object type attribute. However, this could be of the text type as well.

For all the above target field types, if the attribute type is not relevant at all, a value will not be set for it.

You can also use placeholders in post functions. For more information, see this article.

In this article


Related articles



  • No labels