...
Get Asset Attribute values by asset object
SciptScript:
Code Block |
---|
import inventoryplugin.entity.JipInventory import inventoryplugin.entity.JipInventoryItem def result = "" result = result + "\n" + "Asset name: " + asset.getName() result = result + "\n" + "Form name: " + asset.getForm().getFormName() result = result + "\n" + "Attachments details: " + asset.getAttachments() result = result + "\n" + "Creator: " + asset.getCreator() result = result + "\n" + "Create time: " + asset.getCreated() // attributes of asset for(JipInventoryItem inventoryItem: asset.getInventoryItems()){ // For the demo, we append all values to the Text area, so we skip TextArea attribute type values. if(inventoryItem.getFormAttribute().getAttribute().getAttributeType() != 'TextArea'){ result = result + "\n" + inventoryItem.getFormAttribute().getAttribute().getAttributeName() + ": " + inventoryItem.getValue() } } return issue.description + "\n" + result |
...