If I type this in to the ScriptRunner Console, it does not recognize iqlFacade.findObjectsByIQLAndSchema. I get a message the says it can't find the matching method. This happens with any objectFacade call such as objectFacade.loadObjectBean("object key here") ie TSD-18.
/* Get Insight IQL Facade from plugin accessor */
Class iqlFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass(
def iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(iqlFacadeClass);
/* Specify the schema id as well as the IQL that will fetch objects. In this case all objects with Name matching the valueCF, be sure to include " around value */
def objects = iqlFacade.findObjectsByIQLAndSchema(
"\"The attribute\" = \""
+ attribute value +
// See the complete list of possible IQL on the Insight Query Language documentation page
/* If this is a mandatory field you should be able to do this: */
"Insight object: "
If i'm not mistaken, you are missing the @withPlugin tag.
Check our documentation about it here:
Did this help? If so, could you accept my answer so that other users know that this question has been solved?
I just tried and I get this error
"Unable to resolve class WithPlugin, unable to find class with annotation"
We have Riada Insight installed and it is working great.
The good news is that I have switched to using the Insight Script Console and it works for this.
We had so many wierd errors and it was so hit-and-miss and because there is no common interactive IDE design environment, like Visual Studio, for writing and debugging code we switched all of our code over to C# and now use the REST APIs.
One of the issues was that each thrid party vendor has their own script editor and we are not confortable replying on third party add-ons from so many sources.
ScriptRunner is a good product in itself, but to me if writing code is such an intergral part of an application/software suite, then maybe it should be part of the core software to supply a built in editor OR integrate with something like Visual Studio that can be used regardless of language choice. Not being able to debug or step through code is a non-starter for me.
Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs