Assets And Inventory plugin lets you integrate workflows and asset objects.
1- [AIP] - Update Asset workflow postfunction
Add "[AIP] - Update Asset workflow postfunction" to the workflows to update an asset object on transition.
Please put the post function in the middle; after issue updates and before GenerateChangeHistoryFunction and Re-index post functions.
Parameters
...
...
...
Form: Define specific Form or select "Any form" to update the assets having the attribute.
Attribute: Target attribute to set it's value
...
Groovy Scripts to execute or Source Custom Field
(one for each attribute definition)
...
There 3 options to use as source value:
- Use default groovy script: "Default groovy script" result will be set to the attribute value
- Custom groovy script: Specify atrribute specific groovy script to set as value.
- JIRA Custom field value: If issue has the specified custom field, that fields value will be assigned to the asset attribute.
Sample Post Function configuration page
You can add multiple post functions or multiple attributes for one post function.
Groovy examples for Asset Attribute Types
...
return "ist"
...
DatePicker
...
import java.time.*
LocalDateTime t = LocalDateTime.now();
return (t as String)
...
import java.time.*
LocalDateTime t = LocalDateTime.now();
return (t as String)
...
return "ada"
...
return "3"
...
return "10"
...
return "10.0.0.2"
...
return "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
...
return "izm"
...
return "ada"
...
return "ist"
...
...
return issue.description
...
return "http://www.snapbytes.com/"
...
return issue.reporter.username
...
Another post function example for All Attribute types
You can update all fields of an attribute in one post function.
...
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
This page is about Assets & Inventory Plugin for Jira DC. Using Cloud? Click here. |
This document explains how to leverage the Assets & Inventory Plugin's post functions to automate asset management within your Jira workflows.
Available post functions
Create Asset: This function allows you to automatically create a new asset object when a specific transition occurs in your workflow.
Update Asset: This function enables you to update existing asset information based on workflow transitions. You can update various asset details, including associated issues, JIRA components, and custom fields.
Asset Generic Groovy Script: This function provides advanced users with the ability to execute custom Groovy scripts to manipulate asset data during workflow transitions.
Important notes
In case a post function encounters an error during execution, it will be skipped and logged for troubleshooting purposes.
All Assets & Inventory Plugin post functions are easily identifiable by the prefix "
[AIP] -
".