Post functions
Adding Insight functions to workflows in Jira
On this page
Related content
- No related content found
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:
- Open a workflow that you'd like to add the post functions to.
- Select a transition. Post functions are added to a transition rather than a workflow step.
- Select Post-functions, then select Add.
- Select Insight Post-function.
- Select one of the available options. Learn more about them in the table below.
Available options
Here you can find the available post functions.
The selected object will be added, removed, or set to the corresponding attribute of the target object.
Name | Description |
---|---|
Condition | Specify 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. |
The selected user custom field will be used to find Insight objects that are associated with that user.
Name | Description |
---|---|
Condition | Specify 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 name | Optional object type attribute to filter objects on. |
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).
Name | Description |
---|---|
Condition | Specify 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). |
Select an Insight object and specify the attribute the assignee will be fetched from.
Name | Description |
---|---|
Condition | Specify 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. |
Select an Insight object and specify the "User" or "Default / Email" attribute to which an email will be sent.
Name | Description |
---|---|
Condition | Specify 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 an object attribute value (of type Integer) by a set amount.
Name | Description |
---|---|
Condition | Specify 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). |
Selected objects will have their specified attribute set to the predetermined value.
Name | Description |
---|---|
Condition | Specify 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 value | Specify 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. |
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.
Name | Description |
---|---|
Enter your Groovy code. |
Select an Insight object schema, object type, and configure the attributes to be populated from a Jira Issue.
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.
Name | Description |
---|---|
Condition | Specify the Groovy code to use as condition for this post function to execute. Condition ignored on empty value. |
Assign to issue | The 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 create | If selected, Insight will create the object even if mandatory object attributes haven't been mapped correctly. |
Object schema | Specify the object schema that contains the object type of interest. |
Object type | Specify 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:
Field | Jira type | Object type attribute type | Expected object type attribute value |
---|---|---|---|
Affected version(s) | Version(s) |
|
|
Assignee | User |
|
|
Description | Text |
|
|
Due date | Date |
|
|
Fix version(s) | Version(s) |
|
|
Issue type | Issue type |
|
|
Key (issue) | Text |
|
|
Labels | Label(s) |
|
|
Priority | Priority |
|
|
Project | Project |
|
|
Reporter | User |
|
|
Resolution | Resolution |
|
|
Resolved | Date |
|
|
Status (Issue) | Status |
|
|
Summary | Text |
|
|
customfield_xxxxx | Undefined |
| 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 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.
Name | Description |
---|---|
Condition | Specify 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) |
Related content
- No related content found