I’m searching Insight objects using IQL, the code as the following:
Class iqlFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade") def iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(iqlFacadeClass) def insightObjectName = "My Object" def objects = iqlFacade.findObjectsByIQLAndSchema(2, "Name = \"" + insightObjectName + "\"")
This code works if I run it from
Insight Script Console, and it returns a list with My Object inside.
But when I paste it to the Exalate incoming script, it does not work anymore.
So what is the problem here?
Thank you very much!
I tried to do a
loadObjectBean from both sides.
The object is loaded successfully from
Insight Script Console.
On the Exalate side, it threw an Exception
PermissionInsightException: Anonymous User., so I think the problem here related to Permission.
So does anyone know how to fix this?
def object = objectFacade.loadObjectBean("IFI-116")