I'm working with Jira Data Center 9.12.x.
I have created Asset objects. I have added an Asset Custom Field to my issue with the field configured to allow selection of only one object from the list.
I want to set the Summary field of the issue to the Name of the object. I know I can do this with an Automation Rule.
I'm trying to figure out if it can be done in a workflow post function.
The native Assets Post-Function appears to support copying asset data only to issue custom fields. It does not allow me to select the Summary field as the destination.
I have ScriptRunner, JWT, and JMWE.
With ScriptRunner I have tried to create a custom inline script to use with the Custom Script Post Function, but haven't found an example of code that has worked correctly for me to retrieve the Asset based on the information in the Asset Custom Field in the issue
I have tried this code:
def assetKey = issue.getCustomFieldValue("customfield_1234")
def assetObject= Assets.getByKey("${assetKey}")
I get back this error:
No object with key '[Name of object {object key)]' exists
I'm sure I have missed a piece of documentation or example that is readily available, but my Google searches so far have been unsuccessful.