This tutorial will guide you through writing Closures.The code snippets in the previous tutorial can be simplified to:
issue.getAvailableOptions("versions").findAll{ it.isReleased() }.size()
//Find whether a particular check box is selected or not issue.get("Scheduled tasks").any{ it.value == "Printing" }