Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
This page is about Assets & Inventory Plugin for Jira DC. Using Cloud? Click here. |
This document explains how to access information about asset custom fields within a generic Groovy script post function used in workflows. The generic post function injects the issue's asset custom fields to the post function context as List<AssetCustomFieldAndValue>
with the name assetCustomFieldAndValueList
.
On this page:
|
---|
AssetCustomFieldAndValue
Represents one custom field and values.
...
Class field | Description |
---|---|
| Numeric custom field ID. For example, |
| String version of custom field ID. For example, |
| Original name of the field. |
| Translated name of the custom field. It is translated by the current user language preferences. |
Code Block | ||
---|---|---|
| ||
package inventoryplugin.workflow.function.genericscript.dto; import com.atlassian.jira.issue.fields.CustomField; public class AssetCustomField { private Long id; private String customFieldId; private String fieldName; private String translatedFieldName; public AssetCustomField() { } public AssetCustomField(CustomField customField) { this.id = customField.getIdAsLong(); this.customFieldId = customField.getId(); this.fieldName = customField.getUntranslatedName(); this.translatedFieldName = customField.getFieldName(); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCustomFieldId() { return customFieldId; } public void setCustomFieldId(String customFieldId) { this.customFieldId = customFieldId; } public String getFieldName() { return fieldName; } public void setFieldName(String fieldName) { this.fieldName = fieldName; } public String getTranslatedFieldName() { return translatedFieldName; } public void setTranslatedFieldName(String translatedFieldName) { this.translatedFieldName = translatedFieldName; } } |