I wanted to limit the list of issues to only those with link type "Epic-Story Link" using the "collect" command. I used this code:
findAll() will filter the collection. The closure must return a true or false to decide if the item in the collection should be returned
collect() will transform the collection (it's called "map" in many other languages). A collect() will always return the same number of items as the original collection it was called on. The closure can return anything and that's what the new collection will contain.
There is a method that combines the two. findResults{}.
This functions like a collect{} but only non-null values are kept in the resulting collection
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.