Hi, I am new in jira.
I want ask one question.How can I retrieve object with this iql:"Created" > now(-5d) and "Created" < now(-4d) on groovy script?
I need Name of the objects which described in the image.
Riada has got pretty nice documentation on Insight so I would start to look at https://documentation.riada.se/insight/latest/insight-advanced-usage-guide/insight-for-developers/groovy-scripting/groovy-script-examplesThen - (consultant's answer) it depends on use case. :-)
Hello @Jamil Rahimov
It's pretty easy to execute JQL via groovy/ script runner. You have to use SearchService and QueryParser
Please see here
https://community.atlassian.com/t5/Marketplace-Apps-questions/How-to-run-JQL-query-inside-Groovy-script/qaq-p/194691
It is rather for IQL (Insight Query Language) from Insight for JIRA. AT least as I look at the screen. :-)
Thank you very much))
Hello @PJ Wysota
Indeed, not used to queries around IQL in the community, just comes across too much similar to JQL
I have upvoted your answer!
Can you help me,please?
Why does it show errors?
My object schema id is 3 and I used IQL in iql.facade.findObjectsByIQLAndSchema() but it gives error
I would try Object TypeID parameter instead of name - don't know for what reason but with some IQL functions these work better. If still nothing - post a ticket to Riada Support - I love those Swedes for prompt replies and fast turnaround with requests (recently my team logged 8 within a month - all resolved within 72h) - https://riada.se/service-center/product-support/BTW - You might follow Valiantys blog: https://blog.valiantys.com/en/ - soon there will be few posts from myself on mastering Insight. :-)
Hello,
not so easy but i found the correct syntax :
For : objectType = "Applications Workstation"
use :
def objects = iqlFacade.findObjectsByIQLAndSchema(10,"\"objectType\" = \"" + "Applications Workstation" + "\""); // See the complete list of possible IQL on the Insight Query Language documentation page
I'm trying to found the good syntax for my complete IQL but not easy to construct it :
objectType = "Applications Workstation" or objectType = "Applications Servers"
not working : def objects = iqlFacade.findObjectsByIQLAndSchema(10,"\"objectType\" = \"" + "Applications Workstation" + "\"" + "\"OR\" + "\"objectType\" = \"" + "Applications Servers" + "\"");
It looks like you're new here. Sign in or register to get started.