Purpose
This provides the answers to the query for “List all of the people who have granted or denied a review in the Bugzilla product in the last 6 months” 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 Reviews Widget, do the following:
- Copy the Reviews.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 Reviews.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="Review"> <param name="class" value="com.wmpnj.bugz.portlets.Reviews" /> </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 Reviews 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=Reviews portlet0.column=2 portlet0.package=com.wmpnj.bugz.portlets.Reviews portlet0.className=Review portlet0.method=getText portlet0.stylesheet=Reviews.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!
