I have some currently working code that creates an object (asset) in our Object Schema when a customer submits an Issue. It is to reduce some of the manual work of copying information across to our Object Schema by hand.
Scriptrunner-
{
"objectTypeId": XXXXX,
"Attribute 1": "{{issue.key.jsonEncode}}", [This works]
"Attribute 2": "{{issue.name.jsonEncode}}", [This works]
"Attribute Date": "{{issue.customfield_XXXXX.jiraDate}}", [This works]
"Attribute List": "{{what do I put here?}} [only works if it's a Text field]
}
This has been transcribed so there may be some typos but essentially, I have been successful in Attribute 1, 2 and date fields but when it comes to Attribute List, I can't get the information to come across to the OBJ Schema attribute. it still just says "No Value".
The Attribute List is a multi-selectable dropdown which is referencing a pre-existing Object Schema. When a customer submits an issue with a selection in this field, I need to know how to put those same selections into the attribute on our Object Schema.
I have tried some things like object lookup, value, ID etc but I may not be writing it correctly. I know the ID for the Object Schemas, I have all the custom field ID's required, I just need to know how to write it properly.
As an example, customer A will submit an issue and select Computer 1, Computer 2 and Computer 3 from the list of objects, these objects are from "List of Computers" Object Schema. I need those objects to transcribe across to the "Computers" attribute when the asset is automatically created.
Cheers.