Purpose
This provides the answers to the query for “See who triages the most newly filed bugs by counting the number of times each person has changed bugs from the UNCONFIRMED state in the bug activity table” from http://www.bugzilla.org/docs/queries.html.
This demonstrates the following:
- How to leverage the internal ConnectionPool to execute a Statement
- How to include a css file to style the portlet
- How to use log4j to write out any error message (assumes you’ve set the log4j.properties to “debug”)
Note that this uses the same package name as the application (com.wmpnj.bugz) in order to leverage the ConnectionPool.
Screenshots


Installation
Note: This version will only work with Bugs Dashboard v3.0 and up due to the use of the parameter to restrict this portlet to a specific product if desired.
To use the Triage Portlet, do the following:
- Copy the Triage.class file at com/wmpnj/bugz/portlets into the deployed web application directory; i.e. /webapps/bugs/WEB-INF/classes/com/wmpnj/bugz/portlets. This may require that you also copy the directory “portlets” if this is the first portlet you’re deploying.
- Copy the Triage.css file to the deployed web application css directory; i.e. /webapps/bugs/css.
- Update the dwr.xml file in the deployed web application WEB-INF directory; i.e. /webapps/bugs/WEB-INF. Edit the file with a text editor and add the following after the last </create> statement:
<create creator="new" javascript="Triage"> <param name="class" value="com.wmpnj.bugz.portlets.Triage" /> </create>
- Update the portlets.properties file in the deployed web application classes directory; i.e. /webapps/bugs/WEB-INF/classes:
- Update the first line by incrementing the count of portlets by 1
- Add the following in the position that you want the portlet to appear within your desired column. For example, if you want the Triage to appear at the top of the right-most column, you must insert this ahead of any other portlet whose column is “2″. After adding the following block, you MUST then renumber the portlets appropriately, beginning with 0, i.e. “portlet0″, “portlet1″.
portlet0.title=Triage portlet0.column=2 portlet0.package=com.wmpnj.bugz.portlets.Triage portlet0.className=Triage portlet0.method=getText portlet0.stylesheet=Triage.css portlet0.javascript= portlet0.desc= portlet0.call= portlet0.restrictTo=
You may change the title and column, but do NOT change the package, className, or method!
