I am using Assets to set my custom field "assignment group." How I plan on making this work is by leveraging Automation Rules to trigger once an issue is transitioned to a specific status.
An important fact to point out is that the Description field is templated to include text called CO AG:, where the name of the assignment group will appear. For example in the description it will say CO AG: Service Desk.
1st attempt
1. I had an "Edit Issue Field" Action which was written as follows, and got an error saying data was not an array.
{
"fields": { "customfield_16604": { "name": "{{issue.description.match("\#1st AG:\s+(.*)")}}" }
}}
2nd attempt
1. I added "Lookup Asset objects from AQL" action with the following query
Name = "{{issue.description.match("\#CO AG:\s+(.*)")}}"
2. Add Log Action
Lookup result: {{lookupObjects.Name}}
3. Add Edit Issue action to fix array issue
{
"fields": { "customfield_16604": [{ "key": "{{lookupObjects.Key}}" }]
}}
4. Result shows "Success" but the field is not being updated, and the log is showing no value either.
I've tried name and asset key and neither worked. If someone could help with this it would be immensely appreciated. Thank you!