Post functions
Adding Assets 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 Assets.
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 Assets 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 Assets 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. | |
Assets 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 Assets 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 Assets 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 Assets 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 Assets 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 Assets 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 Assets 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 Assets 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 Assets 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 Assets 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 Assets Groovy script examples.
Name | Description |
---|---|
Enter your Groovy code. |
Select an Assets 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 Assets 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, Assets 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 AQL query. Any issue value is available as place holders. Use the common field definitions for Jira fields. The AQL query will run upon the schema which the Assets 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 AQL to filter the objects to set on the specified custom field in next configuration. The AQL supports placeholders from any issue field. | |
Specify the Assets custom field that the filtered objects should be attached. (Referenced Assets Custom fields aren't supported) |
Related content
- No related content found