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.

Scripted Build List Gadget - Pagination Not Working in QuickBuild 16.0.2 #4699

odeothx ·

Dear PMEase Support Team,

I am using QuickBuild 16.0.2 and have a question regarding the pagination behavior of the Scripted Build List Gadget.


Environment

  • QuickBuild Version: 16.0.2
  • Browser: Tested on multiple browsers (Chrome, Edge)
  • Dashboard: Custom Dashboard with Scripted Build List Gadget

Description

I have configured a Scripted Build List Gadget on a Dashboard with a Groovy script that returns a full list of Build objects (90+ builds). The gadget correctly displays "Showing 1 to 25 of 90" along with page navigation buttons [1][2][3][4]. However, clicking any page number other than [1] does not navigate to the corresponding page — the gadget always re-renders page 1.


Steps to Reproduce

  1. Create a Dashboard and add a Scripted Build List Gadget.
  2. Enter a Groovy script that returns a full list of Build objects (90+ builds).
  3. Confirm the gadget displays "Showing 1 to 25 of 90" with page buttons [1][2][3][4].
  4. Click page button [2], [3], or [4].
  5. The gadget reloads but always shows page 1.

Investigation

I attempted to implement server-side pagination by using the pageIndex and pageSize variables, which I understood to be injected into the script context. However, I found that pageIndex is always null regardless of which page button is clicked, as confirmed by the following diagnostic code:

groovy:
def currentPage = 0
try { currentPage = (pageIndex ?: 0) as int } catch(e) {}
// currentPage is always 0 regardless of which page button is clicked

I also tested with the MVEL script engine and observed the same behavior.


Questions

  1. Is there a specific way the Scripted Build List Gadget is intended to support pagination in QuickBuild 16.0.2?
  2. Are pageIndex and pageSize supposed to be injected into the script context when a page navigation button is clicked? If so, is there any additional configuration required to enable this?
  3. If server-side pagination via script variables is not supported, is there an alternative approach to implement pagination in the Scripted Build List Gadget?

I have the full server-side stack trace available if it would be helpful for your investigation. Please let me know if you need any additional information.

Thank you for your assistance.

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

Fixed in QB 16.0.3. Your groovy script needs to return the full list of builds, and the gadget will perform pagination in memory.

odeothx ·

Thank you for the update! I've confirmed that the pagination works perfectly in QB 16.0.3.
I really appreciate your quick fix and support.