Package b4j.report
Class ChangeLogReport
java.lang.Object
b4j.report.AbstractReportGenerator
b4j.report.AbstractFileReport
b4j.report.ChangeLogReport
- 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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ChangeLogReport.ReleaseComparator
Implements the sorting of releases. -
Constructor Summary
Constructors Constructor Description ChangeLogReport()
Constructor. -
Method Summary
Modifier and Type Method Description void
closeReport()
Closes a report.void
configure(org.apache.commons.configuration.Configuration config)
Reads the configuration for the ChangeLog.protected java.lang.String
getBugText(Issue bug)
Returns the text for a bug record to appear in Change Log.protected Release
getRelease(Issue bug)
Maps the bug's last change date to a release.protected java.lang.String
getReleaseText(Release r)
Returns the text for a release to appear.void
registerBug(Issue bug)
Registers a bug for the report.Methods inherited from class b4j.report.AbstractReportGenerator
getBugzillaSession, getMaximumBugzillaVersion, getMinimumBugzillaVersion, prepareReport, setBugzillaSession
-
Constructor Details
-
ChangeLogReport
public ChangeLogReport()Constructor.
-
-
Method Details
-
configure
public void configure(org.apache.commons.configuration.Configuration config) throws org.apache.commons.configuration.ConfigurationExceptionReads 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 interfaceIConfigurable
- Overrides:
configure
in classAbstractFileReport
- Parameters:
config
- - the configuration object- Throws:
org.apache.commons.configuration.ConfigurationException
- - when a configuration problem occurs- See Also:
AbstractFileReport.configure(Configuration)
-
registerBug
Registers a bug for the report.- Parameters:
bug
- - the bug to collect data from- See Also:
BugzillaReportGenerator.registerBug(b4j.core.Issue)
-
getBugText
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
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
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
-