In our Asset DB (using Insight plugin), we have a Parent called "Software Licensing & Support". Within this Parent Object type, I have listed all of our software assets that we renew each year. One Child object is "Atlassian Suite" and within this object, we have listed out Jira, Confluence, and several plugins.
How do I use Insight automation to create 1 ticket for "Atlassian Suite renewals" that has all of the active child objects (Jira, Confluence, etc) populated in the ticket?
Right now I can only figure out how to create one rule that pulls all objects in the query...but it creates multiple jira tickets.
Thanks!
The automation in Insight is record-oriented, so I don't think it is possible to directly generate a single issue with a list of objects via automation. The best solution I have found is to build a service based on ScriptRunner's GroovyService that finds and manipulates the whole list. I have mostly used it to send emails, but it wouldn't be hard to create an issue from the list. Here is a snippet to run an IQL query as a starting point:
import com.atlassian.jira.component.ComponentAccessor
Class iqlFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade");
def iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(iqlFacadeClass);
def objects = iqlFacade.findObjectsByIQLAndSchema(19, "Active = true")
objects.join(", ")
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.