sb.append("<tr valign='top'" + (row % 2 == 0 ? altStyle : "") + ">");
sb.append(" <td" + tdStyle + ">" + history.getLoggedBy().getName() + "</td>");
sb.append(" <td" + tdStyle + ">" + history.getStatusValue() +"</td>");
sb.append(" <td" + tdStyle + ">" + (history.getAssignedTo() == null ? "" : history.getAssignedTo().getName()) + "</td>");
sb.append(" <td" + tdStyle + ">");
Attachment attachment = history.getAttachment();
if (attachment != null) {
if (request != null && response != null) {
String href = response.encodeURL(request.getContextPath() + "/app/attachments/" + attachment.getFileName() +"?filePrefix=" + attachment.getFilePrefix());
sb.append("<a target='_blank' href='" + href + "'>" + attachment.getFileName() + "</a> ");
} else {
sb.append("(attachment: " + attachment.getFileName() + ") ");
}
}
sb.append(fixWhiteSpace(history.getComment()));
sb.append(" </td>");
sb.append(" <td" + tdStyle + ">" + history.getTimeStamp() + "</td>");