I am trying to create a ScriptRunner condition within a workflow to determine if an issue's custom field contains X assets. I know multi select asset custom fields hold as an array. In script runner they are in a List, but I can figure out how to reference the objects as they are showing as below:
This is how is shows in the ticket and in XML:
I this code but it results in false:
issue.customfield_14962 .map(asset => asset.key) .includes("b2166d00-0d11-45d4-8aa2-6d3d154a18ab:367782")
I eventually found my answer, available fields are
{"id":"b2166d00-0d11-45d4-8aa2-6d3d154a18ab:367782","objectId":"367782","workspaceId":"b2166d00-0d11-45d4-8aa2-6d3d154a18ab"},{"id":"b2166d00-0d11-45d4-8aa2-6d3d154a18ab:367790","objectId":"367790","workspaceId":"b2166d00-0d11-45d4-8aa2-6d3d154a18ab"}
So to validate the code was
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.