...
The From: contains the email address of the sender JIRA user
The To: matches the JEMH Cloud Profile catchemail (mailbox) address
The Subject: contains the issue-key
The content contains Directives (more on this later)
...
...
Velocity Context Additions: $jemhDirectiveSetLinkManager
Using $jemhDirectiveSetLinkManager to create Directive Set Links
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:
|
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:
...
Create the Directive Set in Notifications > Directive Set > Create
Remember the id of the Directive Set (first column on table)
Go to Notifications > Custom Macros and Edit. Add the macro below (replace parameters $directiveSetId, $profileId, $catchEmailAddress) and save.
Create an Issue and inspect the generated email. The email should have the Assign to Ryan link
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.
...
Create Select List (single choice) custom field in Cog > Issue > Custom Fields > Create
Add field to project's screen
Create 3 Directive Sets in JEMH Cloud >Notifications > Directive Sets
Directive Sets page should looks like this:
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:
Then, an email sent to your customer will include the 3 icons + links.
When the user clicks in one of them, the Directive Set will be executed invalidating the other links.
JIRA - GENERIC - Custom Satisfaction Custom Macros
...