Hi I'm trying to use Groovy Runner to create an issue as part of a Post Function. However, before the post-function creates the issue, I'd like to run a search and check for existing issues with the same Summary or matching custom fields, and if found, link to that issue instead of creating a new issue.
I can't seem to find out how to do the jira search part of the script. I could probably do a JQL search in the GUI but I don't know how to translate that into script code. Any suggestions?