@Override
public FieldJsonRepresentation getJsonFromIssue(final Issue issue, final boolean renderedVersionRequired,
final FieldLayoutItem fieldLayoutItem)
{
final List<Attachment> comments = attachmentManager.getAttachments(
issue, new AttachmentFileNameCreationDateComparator(getAuthenticationContext().getLocale()));
final FieldJsonRepresentation fieldJsonRepresentation = new FieldJsonRepresentation(
new JsonData(attachmentJsonBeanConverter.shortBeans(comments))
);
if (renderedVersionRequired)
{
fieldJsonRepresentation.setRenderedData(new JsonData(AttachmentRenderedJsonBean.shortBeans(comments, jiraBaseUrls,
thumbnailManager, dateTimeFormatterFactory, authenticationContext.getUser(), emailFormatter)));
}
return fieldJsonRepresentation;
}
}