String contextStr =
( absURLs ? bReq.getServletUrlPrefix() : "" )
+ bReq.getServletContext();
Description desc = bug.getDescription();
EnvDescription eDesc = bug.getEnvDescription();
Description repro = bug.getReproDescription();
Description around = bug.getAroundDescription();
cW.println( "<table width=\"100%\" cellspacing=\"0\"" );
cW.println( " cellpadding=\"0\">" );
cW.println( "<tr>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>Project:</strong>" );
cW.println( this.dbConfig.getProjectName( bug.getProject() ) );
cW.println( "</td>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>Release:</strong>" );
cW.println( (eDesc == null)
? "Unknown" : eDesc.getRelease() );
cW.println( "</td>" );
cW.println( "</tr>" );
cW.println( "<tr>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>Category:</strong>" );
cW.println
( this.dbConfig.getCategoryName
( bug.getProject(), bug.getCategory() ) );
cW.println( "</td>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>SubCategory:</strong>" );
cW.println
( this.dbConfig.getSubCategoryName
( bug.getProject(), bug.getCategory(),
bug.getSubCategory() ) );
cW.println( "</td>" );
cW.println( "</tr>" );
cW.println( "<tr>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>Class:</strong>" );
cW.println( this.dbConfig.getClassName( bug.getBugClass() ) );
cW.println( "</td>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>State:</strong>" );
cW.println( this.dbConfig.getStateName( bug.getState() ) );
cW.println( "</td>" );
cW.println( "</tr>" );
cW.println( "<tr>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>Priority:</strong>" );
cW.println( this.dbConfig.getPriorityName( bug.getPriority() ) );
cW.println( "</td>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>Severity:</strong>" );
cW.println( this.dbConfig.getSeverityName( bug.getSeverity() ) );
cW.println( "</td>" );
cW.println( "</tr>" );
cW.println( "<tr>" );
cW.println( "<td width=\"50%\">" );
cW.println( "<strong>Confidence:</strong>" );
cW.println( this.dbConfig.getConfidenceName( bug.getConfidence() ) );
cW.println( "<br>" );
cW.println( "</td>" );
if ( desc.hasEmail() )
{
cW.println( "<td width=\"50%\">" );
cW.print ( "<a href=\"" );
cW.print ( contextStr );
cW.print ( "/" );
cW.print ( bReq.getViewerServletName() );
cW.print ( "/ShowEmail/" );
cW.println( desc.getEmailId() );
cW.println( "\">" );
cW.println( "<strong>" );
cW.println( "View Original Email" );
cW.println( "</strong>" );
cW.println( "</a>" );
cW.println( "</td>" );
}
cW.println( "</tr>" );
cW.println( "</table>" );
cW.println( "<p>" );
StringBuffer openDateStr = new StringBuffer();
FieldPosition openPos = new FieldPosition(0);
this.dateFmt.format( bug.getOpenDate(), openDateStr, openPos );
cW.println( "<strong>Date Opened:</strong>" );
cW.println( openDateStr.toString() );
cW.println( "<br>" );
StringBuffer closeDateStr = new StringBuffer();
if ( bug.getCloseDate() == null )
{
closeDateStr.append( "Not closed." );
}
else
{
FieldPosition closePos = new FieldPosition(0);
this.dateFmt.format( bug.getCloseDate(), closeDateStr, closePos );
}
cW.println( "<strong>Date Closed:</strong>" );
cW.println( closeDateStr.toString() );
cW.println( "<br>" );
cW.println( "<strong>Responsible:</strong>" );
String responsible = null;
if ( bug.getResponsible() == 0 )
{
responsible = "Not assigned";
}
else
{
responsible =
this.dbConfig.formatPerson( bug.getResponsible() );
}
cW.println( responsible );
cW.println( "<p>" );
cW.println( "<DL>" );
cW.println( "<DT><strong>Synopsis:</strong>" );
cW.println( "<DD>" );
cW.println( bug.getDescription().getSynopsis() );
cW.println( "</DL>" );
if ( eDesc == null )
{
cW.println( "<strong>Environment:</strong>" );
cW.println( "Environment Not Defined" );
}
else
{
cW.println( "<DL>" );
cW.print ( "<DT><strong> " );
cW.print ( "Environment:</strong> " );
cW.println( "(jvm, os, osrel, platform)" );
cW.println( "<DD>" );
cW.print ( eDesc.getJVM() );
cW.print ( ", " );
cW.print ( eDesc.getOS() );
cW.print ( ", " );
cW.print ( eDesc.getOSRelease() );
cW.print ( ", " );
cW.println( eDesc.getPlatform() );
cW.println( "</DL>" );
cW.println( "<p>" );
cW.println( "<DL>" );
cW.println( "<DT><strong>Additional Environment Description:</strong>" );
cW.println( "<DD>" );
cW.println( eDesc.getDescription() );
cW.println( "</DL>" );
}
cW.println( "<p>" );