How to use the Customizer Script to filter the currently logged user for the 'Issues Work Log Table' Report in the Dataplane App
This article provides the Dataplane customizer script to filter the currently logged in user for the “Issues Work Log Table” report.
Instructions
Below is an example of an “Issues Work Log Table” report for a project:
Configuration:
Report Result: The report shows a table-based breakdown of each issue that was worked on, as well as the quantity of hours that were logged by each user, for each interval in the time period.To filter the currently logged user, one can use the below customizer script:
USERS_TO_INCLUDE = [ getCurrentUser()?.getKey() ] def includeUser(String user) { return (user != null) && USERS_TO_INCLUDE.contains(user) } customizeResult { def col = getColumn("Work Logged By") Matrix matrix = getMatrix() Matrix newm = matrixFactory.createMatrix() newm.addColumn(matrix.getColumns()) matrix.rows().each { row -> String user = row.getValue(col) if (includeUser(user)) { int rownum = newm.addRow() newm.setRow(rownum, row.getRow()) } } setMatrix(newm) }
Result: