public static WorklogJsonBean getRenderedWorklog(final Worklog log, final JiraBaseUrls baseUrls, String rendererType, IssueRenderContext renderContext, final ApplicationUser loggedInUser, final EmailFormatter emailFormatter) { final WorklogJsonBean bean = new WorklogJsonBean(); addNonRenderableData(bean, log, baseUrls, ComponentAccessor.getUserManager(), loggedInUser, emailFormatter); if (StringUtils.isNotBlank(rendererType)) { RendererManager rendererManager = ComponentAccessor.getComponent(RendererManager.class); bean.comment = rendererManager.getRenderedContent(rendererType, log.getComment(), renderContext); } else { bean.comment = log.getComment(); } JiraDurationUtils jiraDurationUtils = ComponentAccessor.getComponent(JiraDurationUtils.class); bean.timeSpent = jiraDurationUtils.getFormattedDuration(log.getTimeSpent(), ComponentAccessor.getJiraAuthenticationContext().getLocale()); DateTimeFormatterFactory dateTimeFormatterFactory = ComponentAccessor.getComponent(DateTimeFormatterFactory.class); bean.created = log.getCreated() == null ? "" : dateTimeFormatterFactory.formatter().forLoggedInUser().format(log.getCreated()); bean.updated = log.getUpdated() == null ? "" : dateTimeFormatterFactory.formatter().forLoggedInUser().format(log.getUpdated()); bean.started = log.getStartDate() == null ? "" : dateTimeFormatterFactory.formatter().forLoggedInUser().format(log.getStartDate()); return bean; }