I am trying to write a merge check that would verify that all of JIRA issues related to the PR have completed sub-tasks. But I am having trouble using built-in script: https://scriptrunner.adaptavist.com/5.0.9/bitbucket/StashMergeChecks.html#_require_pull_request_to_be_associated_with_a_jira_issue
Documentation does not mention any bindings available to the JQL clause that supports groovy templates, except the mergeRequest, which does not provide me any information that I am interested in.
I would like to put a clause that looks something like:
`issue not in subtasks("parent = '${issueKey}' AND status != Complete")`
But having trouble finding issueKey inside the JQL Clause.