...
This guide explains how to configure the [AIP] - Create Asset workflow post function to automatically create new assets in Jira when specific workflow transitions occur and, optionally, attach to the current issue.
...
Parameter | Description |
---|---|
Condition 1 | Groovy script for the post function condition. The function must return true, or condition must be empty to pass. If the condition fails, the post function will be ignored. |
Condition 2 | Asset custom field value must be empty before the transition. |
Link to issue | Set newly created asset to asset custom field. |
Target Asset custom field | Specify the custom field to link the asset. |
Asset Type | Type of asset to create. |
Attributes (optional) | Target attribute to set its value. |
Context parameters for Groovy
...
scripts
This table details the available context parameters you can leverage within your scripts. Please see Sample Groovy Scripts to Create/Update Asset workflow post functionscripts for asset management in Jira workflows for more examples.
Variable Name | Description |
---|---|
issue | Access current issue. Instance of |
originalIssue | Access the original issue before the transition. Instance of |
ComponentAccessor | Access JIRA Jira components. Refer to the Atlassian documentation. |
customFieldManager | Access JIRA Jira Custom Field Manager class. Refer to the Atlassian documentation. |
loggedInUser | ApplicationUser instance for current logged-in user. Refer to the Atlassian documentation. Example:
|
DefaultIssueChangeHolder | Default implementation of a change holder. It’s used to update a custom field. |
aipUtils | Helper class for the post function groovy Groovy script. Refer to aipUtils for details. |
Sample Post Function configuration page
...