Package org.gjt.bugrat.db

Examples of org.gjt.bugrat.db.Description


    {
    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>" );

    cW.println( "<DL>" );
    cW.println( "<DT><strong>Report Description:</strong>" );

    cW.println( "<DD>" );
    cW.println( desc.getDescription() );
    cW.println( "</DL>" );

    if ( repro != null )
      {
      cW.println( "<p>" );

      cW.println( "<DL>" );
      cW.println( "<DT><strong>How To Reproduce:</strong>" );

      cW.println( "<DD>" );
      cW.println( repro.getDescription() );
      cW.println( "</DL>" );
      }

    if ( around != null )
      {
      cW.println( "<p>" );
      cW.println( "<DL>" );
      cW.println( "<DT><strong>Workaround:</strong>" );

      cW.println( "<DD>" );
      cW.println( around.getDescription() );
      cW.println( "</DL>" );
      }
    }
View Full Code Here


    {
    String contextStr =
      ( absURLs ? bReq.getServletUrlPrefix() : "" )
        + bReq.getServletContext();

    Description desc = rep.getDescription();
    EnvDescription eDesc = rep.getEnvDescription();
    Description repro = rep.getReproDescription();
    Description around = rep.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( rep.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
        ( rep.getProject(), rep.getCategory() ) );

    cW.println( "</td>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>SubCategory:</strong>" );
    cW.println
      ( this.dbConfig.getSubCategoryName
        ( rep.getProject(), rep.getCategory(),
          rep.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( rep.getReportClass() ) );

    cW.println( "</td>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>State:</strong>" );
    cW.println( this.dbConfig.getStateName( rep.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( rep.getPriority() ) );

    cW.println( "</td>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>Severity:</strong>" );
    cW.println( this.dbConfig.getSeverityName( rep.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( rep.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>" );

    cW.println( "<strong>Submitter:</strong>" );
    cW.println( this.dbConfig.formatPerson( rep.getSubmitter() ) );
    cW.println( "<br>" );

    StringBuffer dateStr = new StringBuffer();
    FieldPosition pos = new FieldPosition(0);
    this.dateFmt.format( rep.getSubmitted(), dateStr, pos );

    cW.println( "<strong>Date Submitted:</strong>" );
    cW.println( dateStr.toString() );
    cW.println( "<br>" );

    cW.println( "<strong>Responsible:</strong>" );

    String responsible = null;
    if ( rep.getResponsible() == 0 )
      {
      responsible = "Not assigned";
      }
    else
      {
      responsible =
        this.dbConfig.formatPerson( rep.getResponsible() );
      }

    cW.println( responsible );

    cW.println( "<p>" );
    cW.println( "<DL>" );
    cW.println( "<DT><strong>Synopsis:</strong>" );
    cW.println( "<DD>" );
    cW.println( rep.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>" );

    cW.println( "<DL>" );
    cW.println( "<DT><strong>Report Description:</strong>" );

    cW.println( "<DD>" );
    cW.println( desc.getDescription() );
    cW.println( "</DL>" );

    if ( repro != null )
      {
      cW.println( "<p>" );

      cW.println( "<DL>" );
      cW.println( "<DT><strong>How To Reproduce:</strong>" );

      cW.println( "<DD>" );
      cW.println( repro.getDescription() );
      cW.println( "</DL>" );
      }

    if ( around != null )
      {
      cW.println( "<p>" );
      cW.println( "<DL>" );
      cW.println( "<DT><strong>Workaround:</strong>" );

      cW.println( "<DD>" );
      cW.println( around.getDescription() );
      cW.println( "</DL>" );
      }
    }
View Full Code Here

TOP

Related Classes of org.gjt.bugrat.db.Description

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.