Like it says :-) We're currently using a customised release-notes script which picks up the 'Description' field from our issues and writes it into the notes. Unfortunately, this doesn't parse the wiki-syntax... :-)
Is there any way to get releasenotes-html.vm to call the AtlassianWikiRenderer on this field prior to passing it to $textUtils.htmlEncode()?
It possible to do this also using public-api:
FieldLayoutItem fieldLayoutItem = ComponentAccessor.getFieldLayoutManager() .getFieldLayout().getFieldLayoutItem(IssueFieldConstants.COMMENT); // CommentSystemField JiraRendererPlugin rendererForField = ComponentAccessor.getRendererManager().getRendererForField(fieldLayoutItem); return rendererForField.render("*test*", new IssueRenderContext(null)); // or issue.getIssueRenderContext()
I just had a similar problem. For some reason you cant get AtlassianWikiRenderer directly with ComponentAccessor, but this code works(with Jira 5.1.8):
EventPublisher eventPublisher = ComponentAccessor.getOSGiComponentInstanceOfType(EventPublisher.class); VelocityRequestContextFactory velocityRequestContextFactory = ComponentAccessor.getOSGiComponentInstanceOfType(VelocityRequestContextFactory.class); AtlassianWikiRenderer wikiRenderer = new AtlassianWikiRenderer(eventPublisher, velocityRequestContextFactory); String wikiString = "*bold*"; String htmlString = wikiRenderer.render(wikiString, null); // "<p><b>bold</b></p>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi conro,
Thanks for your input. I'm not that formiliar with adapting JIRA.
How can I implement this solution so I'm able to render a wiki string in the releasenotes template?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm interested in an answer to your question as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.