Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Missing documentation & example for the new gadet "scripted build list" #4386

helmut.n ·

I just tried out the new gadet "scripted build list". But I'm missing some documentation and an example how to use this.

  • replies 2
  • views 660
  • stars 0
robinshen ADMIN ·

For instance, below script returns recent 10 failed builds:

groovy:
import com.pmease.quickbuild.SearchCriteria;
import org.hibernate.criterion.*;
import com.pmease.quickbuild.model.Build;

Criterion[] criterions = [Restrictions.eq("status", Build.Status.FAILED)]
 
Order[] orders = [Order.desc("id")];

return system.buildManager.search(new SearchCriteria(criterions, orders), 0, 10);

For details on how to construct criterion and order, please refer to Hibernate legacy Criteria api:

helmut.n ·

Thanks. This helps. But adding this and a screenshot of the gadget would also be helpful.