Package b4j.report

Class ChangeLogReport

java.lang.Object
All Implemented Interfaces:
BugzillaReportGenerator, IConfigurable

public class ChangeLogReport
extends AbstractFileReport
Creates a Change Log from all closed bugs (see Issue.isClosed()). The change log is a text file that lists all defined releases in configuration along with id and summaries of each bug fixed. A release is defined with name and timestamp within configuration.

This implementation does not evaluate the version information of a bug.

Configuration:

    <report class="b4j.report.ChangeLogReport">
       <outputFile>test-ChangeLog1.txt</outputFile>
        
       <!-- ReleaseProvider Implementation -->
       <ReleaseProvider class="...">
          ...
       </ReleaseProvider>

       <!-- Optional: Additional change log entries -->>
       <ChangeLogEntryProvider class="...">
          ...
       </ChangeLogEntryProvider>

    </report>
 
Author:
Ralph Schuster
See Also:
ReleaseProvider, ChangeLogEntryProvider
  • Constructor Details

  • Method Details

    • configure

      public void configure​(org.apache.commons.configuration.Configuration config) throws org.apache.commons.configuration.ConfigurationException
      Reads the configuration for the ChangeLog. The configuration must be XML based and has the following format:
      <outputFile>D:/ChangeLog.txt</outputFile>
      <Version timestamp="2008-06-10 00:00">
              <Name>Release 1.1</Name>
              <Include>
              All SL Use cases - UC Descriptions reworked\, amended and created
              All SL Use cases - VD11 default sorting stated more precisely
              </Include>
      </Version>
      <Version timestamp="2008-07-16 00:00">
              <Name>Release 1.2</Name>
              <Include>UC55 - VD23 Description updated
              </Include>
      </Version>
      <Version timestamp="2008-08-08 00:00">
              <Name>Release 2.0</Name>
      </Version>
      
      Include lines are taken over into the Change Log.

      Timestamps give the time of the release closure. All bugs closed until that time will be considered for the ChangeLog of that release.

      The Name tag assigns a name to your release.

      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class AbstractFileReport
      Parameters:
      config - - the configuration object
      Throws:
      org.apache.commons.configuration.ConfigurationException - - when a configuration problem occurs
      See Also:
      AbstractFileReport.configure(Configuration)
    • registerBug

      public void registerBug​(Issue bug)
      Registers a bug for the report.
      Parameters:
      bug - - the bug to collect data from
      See Also:
      BugzillaReportGenerator.registerBug(b4j.core.Issue)
    • getBugText

      protected java.lang.String getBugText​(Issue bug)
      Returns the text for a bug record to appear in Change Log. Subclasses can override this function if they wish other texts to appear in a Change Log.
      Parameters:
      bug - - the bug to generate the text from
      Returns:
      the change log entry generated from the bug record
    • getRelease

      protected Release getRelease​(Issue bug)
      Maps the bug's last change date to a release.
      Parameters:
      bug - - the bug to consider
      Returns:
      release for that bug
    • closeReport

      public void closeReport()
      Closes a report. Implementations should persist its collected data or results here.
      See Also:
      BugzillaReportGenerator.closeReport()
    • getReleaseText

      protected java.lang.String getReleaseText​(Release r)
      Returns the text for a release to appear. The text will be printed as a header for each section with entries. The default implementation returns the release name. Subclasses can override this method if they wish to generate other headers.
      Parameters:
      r - - the release to generate the header text from
      Returns:
      the text to print for each change log section