History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-4027
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Phong Trinh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Add additional columns to customized dashboard

Created: 21/Sep/23 03:38 PM   Updated: 08/Jan/24 11:18 AM
Component/s: None
Affects Version/s: 12.0.19
Fix Version/s: 14.0.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. dashboard.GIF
(53 kb)


 Description  « Hide
 Hi Robin/PMEASE
 I created a customized dashboard and added a gadget to display last 10 builds of a specific configuration as follow:
 groovy:
 import com.pmease.quickbuild.*;
 def config = system.configurationManager.get("root/DevTools/Email Notifications")
 def builds = system.buildManager.getBuilds(config)
 builds.sort{a,b -> b.endDate.compareTo(a.endDate)}
 builds=builds.take(10)
 builds

 It displays configuration and build column only. Is it possible to add addtional columns such as Id, Version, Master Node, Begin Date, Duration, Trigger By which is similar to 'Recent Builds'?

 Thank you in advance,
ptrinh
 

 All   Comments   Work Log   Change History      Sort Order:
Change by Phong Trinh [21/Sep/23 03:40 PM]
Field Original Value New Value
Attachment dashboard.GIF [ 10980 ]

Change by Robin Shen [21/Sep/23 11:28 PM]
Issue Type Bug [ 1 ] Improvement [ 4 ]

Robin Shen [21/Sep/23 11:29 PM]
Changed this as an improvement.

Phong Trinh [21/Sep/23 11:31 PM]
Thank you!

Change by Robin Shen [25/Dec/23 11:31 AM]
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]

Change by Robin Shen [25/Dec/23 11:32 AM]
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]

Change by Robin Shen [25/Dec/23 11:32 AM]
Comment [ The scripted build list gadget can be used for this purpose. For instance, you may use below groovy script to get list latest 10 builds triggered by current user:

groovy:

import com.pmease.quickbuild.Context;
import com.pmease.quickbuild.model.Build;
import com.pmease.quickbuild.SearchCriteria;
import org.hibernate.criterion.Restrictions;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;

if (Context.getUser() != null) {
  Criterion[] criterions = [Restrictions.eq("requester", Context.getUser())];
  Order[] orders = [Order.desc("beginDate")];
  def criteria = new SearchCriteria(criterions, orders);
  return system.buildManager.search(criteria, 0, 10);
} else {
  return new ArrayList<Build>();
} ]

Robin Shen [25/Dec/23 11:33 AM]
Sorry please ignore my previous comment. Commented to wrong issue.

Change by Robin Shen [08/Jan/24 11:18 AM]
Status Reopened [ 4 ] Closed [ 6 ]
Fix Version/s 14.0.0 [ 12298 ]
Resolution Fixed [ 1 ]