Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using the Insight plugin > auto create 1 jira ticket with all child objects

NCFMS Renewals November 25, 2019

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!image.png

1 answer

0 votes
Craig Haynal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2019

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(", ")

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events