Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

This tutorial will guide you through writing Groovy scripts that loop over collections. Issue fields that are collection of values cannot be 

On this page:

//Find the count of released versions
def count = 0;
for(i=0;i<issue.getAvailableOptions("versions").size();i++){
  if(issue.getAvailableOptions("versions")[i].isReleased()){
    count++
  }
}
count


//Find whether a particular check box is selected or not
for(i in issue.get("Scheduled tasks")){
  if(i.getValue() == "Printing"){
    return true
  }
}
 

Both these snippets can be further simplified using Closures, explained in the next chapter.

  • No labels