Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Go to JEMH Configuration >Template Sets >Template Macros
    Image RemovedImage Added

  • Click Edit on the User Macros tab
    Image RemovedImage Added

  • Copy the below macro to the bottom of your user macros list

    Note

    The macro provided below is an example, showcasing how the exposed service can be used and can of course be modified to meet the users needs.


...

  • Go to JEMH>Template Setsand click Edit on your chosen template
  • As our macro is making use of HTML tables, we will be looking at the HTML content of the notification
  • Our example notification already has some Issue fields being presented (issue type, affected versions etc.):
  • In order to maintain formatting, we will be calling our macro within the table shown.  To call the custom macro we will use a hash tag followed by our macro name: "#issuelink"
  • Test that your macro is working, by supplying a Preview Context Issue Key.  Enter the issue key of an issue that has one or more linked services:
    Image RemovedImage Added
  • Then, press the blue preview icon to the bottom left of the HTML template window:
  • If everything is set up correctly you will see a preview of the template, including the linked issues of the notification subject issue:

...

Code Block
#if($remoteIssueLinkService.getRemoteIssueLinksForIssue($actionerUser, $issue).getRemoteIssueLinks().size() > 0)
True! Links found.

#set($foundLinks = $remoteIssueLinkService.getRemoteIssueLinksForIssue($actionerUser, $issue).getRemoteIssueLinks())

#foreach($remoteLink in $foundLinks)
$wikiRenderer.render($remoteLink.getTitle(),null)
$wikiRenderer.render($remoteLink.getUrl(),null)
#end

#else
False! No links found.
#end

How it looks

Image RemovedImage Added

...