Post functions

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Adding post functions to your Jira workflows allow you to trigger actions against your objects when an issue is transitioned through the workflow. Here you can find available post functions for Insight.

To view available conditions and validators:

  1. Open a workflow that you'd like to add the post functions to.
  2. Select a transition. Post functions are added to a transition rather than a workflow step.
  3. Select Post-functions, then select Add.
  4. Select Insight Post-function.
  5. Select one of the available options. Learn more about them in the table below.

Available options

Here you can find the available post functions.

Change Insight value into Insight object

The selected object will be added, removed, or set to the corresponding attribute of the target object.

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the custom field where objects are selected and to be added, removed, or set.
Specify the change type.
Specify the custom field where objects should be changed.
Assign object based on Jira custom field

The selected user custom field will be used to find Insight objects that are associated with that user.    

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the custom field where information (email addresses or Jira users) can be found.
Specify the custom field where objects should be assigned.
Insight object type attribute nameOptional object type attribute to filter objects on.
Set a Jira custom field with the attribute value from a selected object

Select an object attribute value of a selected object and set it to another target custom field. Supported fields are Jira Text fields, Jira user fields, Jira group fields and Insight custom fields (not reference fields). 

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the Insight custom field from where objects attribute should be fetched.
Specify the name of the object type attribute where to fetch the value.
Specify the custom field where object attribute should be stored (reference fields can't be selected).
Assign issue based on attribute in a selected object

Select an Insight object and specify the attribute the assignee will be fetched from.

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the Insight custom field from where objects attribute should be fetched.
Specify the name of the object type attribute the user will be fetched from. Any type except "User" or "Default / Email" will be ignored.
Email users based on attribute in selected object

Select an Insight object and specify the "User" or "Default / Email" attribute to which an email will be sent.     

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the Insight custom field from where objects attribute should be fetched.
Specify the name of the object type attribute the user will be fetched from. Any type except "User" or "Default / Email" will be ignored.
Specify the email subject. Issue placeholders are supported.
Specify the email message. Issue placeholders are supported.
Increase or decrease the value of an object attributes

Increase or decrease an object attribute value (of type Integer) by a set amount.

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the Insight custom field from where objects attribute should be fetched.
Specify the name of the object type attribute the user will be fetched from. Any type except "User" or "Default / Email" will be ignored.
Specify the change type: Increase or Decrease.
Specify the change value. Anything except a number will be set to default (1).
Set the value of an object attributes with a predefined value

Selected objects will have their specified attribute set to the predetermined value.

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the Insight custom field from where objects attribute should be fetched.
Specify the name of the object type attribute where to set the value.  
Change valueSpecify the value to set. Any value not validated to the attribute will be ignored. Issue placeholders are supported. Leaving this field empty will set an empty value. 
Run a groovy script within this transition

Write a Groovy script when you have some specific requirements that the predefined Insight post functions can't handle. About parameters into the Groovy engine, you have all the parameters available as in a normal post function. The most common one is "issue" where you may query as you like. Check out Insight Groovy script examples.

NameDescription
Enter your Groovy code.
Create an object from a Jira issue

Select an Insight object schema, object type, and configure the attributes to be populated from a Jira Issue.

(warning) The value of the Issue field mapped to an object attribute must be data format compatible, otherwise Insight won't be able to create a new object. An example of a mapping that will fail: A Jira URL picker mapped to an object attribute of type Integer

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Assign to issueThe newly created object isn't automatically linked to the issue. To assign it to the issue, select the custom field on the issue to contain the reference. 
Always createIf selected, Insight will create the object even if mandatory object attributes haven't been mapped correctly.
Object schemaSpecify the object schema that contains the object type of interest.
Object typeSpecify the object type that corresponds to the type of object that should be created.
 / 

Once the object type is selected, the list of attributes will be listed, allowing a mapping against an Issue field.

Supported Jira issue fields:

FieldJira typeObject type attribute typeExpected object type attribute value
Affected version(s)Version(s)
  • Version
  • Numeric
  • Other
  • Jira Version(s)
  • The Version ID(s)
  • Jira Version name(s)
AssigneeUser
  • User
  • Email
  • Other
  • Jira User
  • Jira User email
  • Jira User display name
DescriptionText
  • Text area
  • Other
  • Description in Wiki format
  • Description
Due dateDate
  • Date
  • Date time
  • Other
  • Date
  • Date time
  • System/User locale format of Date
Fix version(s)Version(s)
  • Version
  • Numeric
  • Other
  • Jira Version(s)
  • Jira Version ID(s)
  • Jira Version name(s)
Issue typeIssue type
  • Numeric
  • Other
  • Issue type ID
  • Issue type name
Key (issue)Text
  • Any
  • The Issue key
LabelsLabel(s)
  • Any
  • The label(s) value(s)
PriorityPriority
  • Numeric
  • Other
  • Priority ID
  • Priority name
ProjectProject
  • Project
  • Numeric
  • Other
  • Jira Project
  • Jira Project ID
  • Jira Project name
ReporterUser
  • User
  • Email
  • Other
  • Jira User
  • Jira User email
  • Jira User display name
ResolutionResolution
  • Date
  • Date time
  • Other
  • Resolution Date
  • Resolution Date time
  • Resolution name
ResolvedDate
  • Date
  • Date time
  • Other
  • Date
  • Date time
  • System/User locale format of Date
Status (Issue)Status
  • Any
  • Status name
SummaryText
  • Any
  • The summary
customfield_xxxxxUndefined
  • Any
The value of the custom field.

Make sure that when using custom fields, the custom field value is possible to set to the target attribute. Otherwise, it will be discarded.

Assign object/s based on an IQL query based on data from an issue

Assign objects to custom fields depending on a configured IQL query. Any issue value is available as place holders. Use the common field definitions for Jira fields. The IQL query will run upon the schema which the Insight custom field belongs.

NameDescription
ConditionSpecify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value.
Specify the IQL to filter the objects to set on the specified custom field in next configuration. The IQL supports placeholders from any issue field.
Specify the Insight custom field that the filtered objects should be attached. (Referenced Insight Custom fields aren't supported)
Last modified on Jun 15, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.