Hello Everyone,
I have been trying to enhance our service management project with automation rules for our asset schema. I seem to have a hard time finding information on how to format the JSON escaping functions for fields that are not simple text. I also encounter failures when trying to update assets with certain field types.
For example,
I have a rule that should trigger when issues transition, search for an issue type, and update an associated assets object tethered to the issue with an assets object field.
{
"objectKey": {{issue.Affected Asset.key.asJsonString}},
"Environment": "{{issue.fields.Environment.value}}"
}
Where "Environment" is a select-list text field for the issue and a select-list text attribute for the asset object.
The rule succeeds on the automation page, but the asset object attribute is not updated.
Rules that use only "manual" text fields with alphanumeric characters have no trouble.
Is there a more detailed list of JSON functions compatible with the Scriptrunner feature? And while here, any thoughts how to fix this failure?
Any help is highly appreciated!
Kind regards,
Stephen
Hi Stephen,
I cannot advise you on how to do this with Automation Rules, but I can advise you that if you use the ScriptRunner Plugin, the HAPI (Helpful API) feature will allow you to set Asset field values using the helper functions it provides.
The documentation for this can be seen on the page here and may provide a way to set the field values you need.
Regards,
Kristian
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.