Forums

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

Find Insight object id/key by name

Jnr November 4, 2021

Hello,

 

I want to get Insight object key by providing object name. Is it possible? 

2 answers

0 votes
David Sumlin
Contributor
November 16, 2021

Just remember that if name isn't configured to be unique, you could potentially return an array of objects.

0 votes
Jnr November 4, 2021
Class iqlFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade");
def iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(iqlFacadeClass);
def iql = "objectTypeId = 1 and Name = \""+issueKey+"\""
def object = iqlFacade.findObjectsByIQLAndSchema(141,iql);

Suggest an answer

Log in or Sign up to answer