Versions Compared

Key

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

...

  1. The From: contains the email address of the sender JIRA user

  2. The To: matches the JEMH Cloud Profile catchemail (mailbox) address

  3. The Subject: contains the issue-key

  4. The content contains Directives (more on this later)

...

Velocity Context Additions: $jemhDirectiveSetLinkManager

The DirectiveSetManager can be interacted with as shown below, to call createDirectiveSetLink. This is used to create the Directive Set Link that will trigger the Directive Set to update the issue. Directive Set Links can be created in the custom Templates, but the easiest way is to inject them in the notifications is via a macro extension in  Notification > Custom Macros. 

JIRA - GENERIC - Directive Links Macros

For JIRA and Generic themes, add the following method in Custom Macros

Code Block
#macro (jemhIncludeDirectiveSetLinks)
    #set ($groupId = $jemhDirectiveSetLinkManager.generateGroupIdForEvent($context))
    #set ($profileId=13)
    #set ($directiveSetId=3)
	#set ($issueKey=$context.issue.key.textValue())
    #set ($catchEmailAddress="user.2.hydra@gmail.com")
    #set ($recipient=$jemhUtils.getRecipient())

    #set ($directSetLinkUrl = $jemhDirectiveSetLinkManager.createDirectiveSetLink($groupId, $directiveSetId, $profileId, $issueKey, $catchEmailAddress, $recipient))
    #if($directSetLinkUrl)
    <tr>
        <td class="email-content-main mobile-expand  wrapper-special-margin">
            <a href="$directSetLinkUrl" target="_blank">$jemhDirectiveSetLinkManager.getDirectiveSetName($directiveSetId)</a>
        </td>
    </tr>
    #end
#end

SERVICE DESK - Directive Links Macros

For Service Desk theme, add the following method in Custom Macros

...

Each link in a single outbound notification is put in a Link Group which is unique to that recipient.  Once a link has been processed by JEMH Cloud, it (and others in that link group) will expire.  If 30 days pass without a link from an individual notification being processed, then this will also cause all related links to expire.

Note

Directive Sets use Directives, so make sure you understand how they work before attempting to use this feature. If changes aren't applied:

  • Check the JEMH Cloud Auditing > Inbound Messages does not show any problems

  • Validate the Profile referred actually has Directives enabled, and the appropriate Field Processor for the body format used, e.g. At Prefix (the example used on this page)


Example Scenarios

As a Directive Set can be configured with any valid Directive there are many ways that this feature can be used, here are just a few example scenarios:

...

  1. Create the Directive Set in Notifications > Directive Set > Create

    Image RemovedImage Added
  2. Remember the id of the Directive Set (first column on table)

  3. Image RemovedImage Added

    Go to Notifications > Custom Macros and Edit. Add the macro below (replace parameters $directiveSetId, $profileId, $catchEmailAddress) and save.

  4. Create an Issue and inspect the generated email. The email should have the Assign to Ryan link

  5. If you click the link, the directive will be executed and the issue's assignee changed. The response is generated based on the Directive Set's template.

...

  1. Create Select List (single choice) custom field in Cog > Issue > Custom Fields > Create

  2. Add field to project's screen

  3. Create 3 Directive Sets in JEMH Cloud >Notifications > Directive Sets


  4. Directive Sets page should looks like this:

    Image RemovedImage Added
  5. For JIRA and GENERIC themes, insert #jemhIncludeDirectiveSetLinks macro below in Notifications > Custom Macros. For Service Desk theme, insert #renderDirectiveSetLinks macro below in Notification >Custom Macros. Update $profileId, $directiveSetIdHAPPY, $directiveSetIdOK, $directiveSetIdUNHAPPY and $catchEmailAddress  to match your values.  Custom Macros in Notification should looks like this:

    Image RemovedImage Added

  6. Then, an email sent to your customer will include the 3 icons + links. 

  7. When the user clicks in one of them, the Directive Set will be executed invalidating the other links.

    Image RemovedImage Added


JIRA - GENERIC - Custom Satisfaction Custom Macros

...