Introduction

Bugzilla reports is a set of reports based on information found in the Bugzilla database. The reports that are possible to configure in Bugzilla are "bug-count" centricts, and sometime there is a need for reports on other aspects, like time-tracking.

The reports are accessible threw the bugzilla-report servlet. Entering the URL to this servlet in a web browser without any parameter will display a web page allowing to choose and configure your report.

http://integration.example.com/jujunie-integration/bugzilla-report
       

Herafter, you'll find one section describing parameters common to all report, and one section per available reports:

Common Parameters and Configuration

Parameters

Parameters name Mandatory Possible values Default value Description
report_code yes See each available reports - Selects the report to produce
full no true, false true For the reports that generates HTML, configure if full HTML page have to be generated, or just the part containing the report itself
task yes generate - This is a mandatory parameter indicating that you do ant to generate the report. As other values are reserved to handle the Web interface, it is not necessary to list them here
preset_queries no Any preset query code defined in the configuration - Selects the preset queries to apply to the selected report

Preset Queries

As you seen in the installation guide section, there is a configuration that allows you to define preset queries reports for each report type, allowing you to define your own subset of predefined reports. This configuration is done using the XML format:
<?xml version="1.0" encoding="UTF-8" ?>
<reports>
 <hours-worked>
  <report id="identifier1" name="My preset Queries Report One">
   <selector name="This is a category"
                add-from="list, of, tables, not, in, original, query"
                add-where="clause = to AND add = to AND the IN (where, query)"/>
  </report>
 </hours-worked>
</reports>
         
The reports elements contains the list of available reports type. Today, there is only one: hours-worked. Each reports type nodes can contains several report node that identify a preset queries entity. Basically, when the user will generate a report, he will first have to select the report type (hours-worked), and then the list of available preset queries reports will be displayed. report element must have an unique identifier, and a name. A report can have several selector. For each selector, the report-type basic query will be executed, but amended with the add-from and add-where values. In order to correctly make your configuration, you have to be aware of the original query, and that's why it will be given in each following subsections.

Preset Queries Combinaison

This is an enhancement identified by bug 21

Using only the configuration described above, the selectors to build for a detailed reporting can be quite huge. The idea is to define a base name and preset query containing variables, and then define wich values can takes those variables. In order to define the values that can take the variable, you can add a combinaison or sets.

A set simply define the values for each variable: the base selector will genrate as many selectors as there is sets defined

A combinaison defines one to n values for each variable: a preset query will be generated for each combinaison of the values of each parameter

Exemple: The selector below is equivalent to the definition of 38 selector nodes as defined in the previous section!!!

<selector name="Category example with {1}, {2} and {3}"
          add-from="keywords, keyworddefs"
          add-where="and keyworddefs.name='{1}'
                     and bugs.component_id={2}
                     and bugs.bug_severity={3}
                     and keyworddefs.id = keywords.keywordid
                     and keywords.bug_id = bugs.bug_id"/>
 <combinaison>
  <param number="1" value="delivery"/>
  <param number="1" value="another"/>
  <param number="1" value="coucou"/>
  <param number="2" value="5"/>
  <param number="2" value="2"/>
  <param number="3" value="blocker"/>
  <param number="3" value="critical"/>
  <param number="3" value="major"/>
 </combinaison>
 <set>
  <param number="1" value="client"/>
  <param number="2" value="10"/>
  <param number="3" value="enhancement"/>
 </set>
 <set>
  <param number="1" value="other"/>
  <param number="2" value="5"/>
  <param number="3" value="enhancement"/>
 </set>
</selector>
      

As I worked for a long time on this evolution, everything appears clear to me, bu t I have the feeling it's not that clear... Please send me e-mails if it's not.

Hours Worked

Generates a HTML consolidated report of hours worked. It consolidates hours worked in Bugzilla using the following analytic axes:

  • All logins
  • Login
  • Task
  • Date range (could be none, daily, weekly or monthly)
  • All Categories / Products
  • Each Category / Product
  • Product components

Parameters

Parameters name Mandatory Possible values Default value Description
from no Any valid date - Define the lower date bound, included, when searching for hours worked. See formatting rules.
to no Any valid date - Define the upper date bound, excluded, when searching for hours worked. See formatting rules.
date-range (Period split) yes NONE,DAILY,WEEKLY,MONTHLY NONE Define the date range to split consolidation
x-show-level (X Show Level) none Any integer - Define the X axis level depth to show. 0 value will show only the first level.
y-show-level (Y Show Level) none Any integer - Define the Y axis level depth to show. 0 value will show only the first level.
logins no Any valid Bugzilla logins - Comma separated list of Bugzilla logind to include in the report. Please do not include any spaces.
individual-report no true or false false if set to "true", an e-mail will be sent to each login given in logins parameter with all its hours worked record for the given period.

Hours Worked Base Query

Original query (usefull to know if you want to configure preset queries based on this report type)
select
  bugs_activity.bug_when,
  profiles.login_name,
  bugs_activity.added,
  bugs_activity.bug_id,
  bugs.short_desc,
  products.name,
  bugs.bug_severity,
  bugs.priority
from 
  bugs_activity,
  profiles,
  bugs,
  products,
  fielddefs
where
  fielddefs.name = 'work_time' and
  bugs_activity.fieldid = fielddefs.fieldid and
  bugs_activity.bug_id = bugs.bug_id and
  bugs.product_id = products.id and
  bugs_activity.who = profiles.userid and
  profiles.login_name in ('here', 'is', 'the', 'list', 'of', 'given', 'logins') and
  bugs_activity.bug_when >= 'YYYY-MM-DD' and
  bugs_activity.bug_when < 'YYYY-MM-DD'
         

HTML Styles

When you integrate this report in an existing page, you may consider the following CSS styles used in the report:
  • DIV.hoursWorkedReport: The block that contain the whole report
  • TABLE.report: The table containing the report entries
  • th.level_x_<n>: Where n is a number (from 0 to the number of X axis). Defines the style or a header cell for X axis with level <n>
  • th.level_y_<n>: Where n is a number (from 0 to the number of Y axis). Defines the style or a header cell for Y axis with level <n>
  • th.level_<n>_<m>: Where n is the X axis level and m the Y axis level. Defines the style or a cell intesection of a X axis level <n> and Y axis level <m>
  • DIV.info: The block that contain the report information
  • TABLE.parameters: Table of report parameters

Deadline

This report generate a ICS file where events are bugs with a deadline. This ICS output can the be used in ICS compliant applications, such Sunbird.

Parameters

Parameters name Mandatory Possible values Default value Description
from no Any valid date - Define the lower date, included, bound for deadline. See formatting rules.
to no Any valid date - Define the upper date, excluded, bound for deadline. See formatting rules.
logins no Any valid Bugzilla logins - Comma separated list of Bugzilla logind to include in the report.
individual-report no true or false false if set to "true", an e-mail will be sent to each login given in logins parameter with all its hours worked record for the given period.

Hours Worked Base Query

Original query (usefull to know if you want to configure preset queries based on this report type)
select
  bugs.bug_id,
  bugs.deadline,
  bugs.short_desc,
  bugs.status_whiteboard,
  profiles.login_name
from
  bugs, profiles
where
  bugs.assigned_to = profiles.userid
  profiles.login_name in ('here', 'is', 'the', 'list', 'of', 'given', 'logins') and
  bugs.deadline >= 'YYYY-MM-DD' and
  bugs.deadline < 'YYYY-MM-DD'