Versions Compared

Key

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

The example provided in https://thepluginpeople.atlassian.net/wiki/spaces/JEMH/pages/114982925/Use+Directive+Sets#Managing-an-issue-workflow. Was considered before JSD Approvals were created.

It is possible to create a custom template based on the current JSM Approval notification as of JEMH version 2.7.0.

Table of Contents
minLevel1
maxLevel7

Prerequisites

Ensure that your JSM Project is setup/contains an issue type with a workflow that implements JSM Approvals.

...

JEMH Profile

Documentation

...

To create your Approved Directive Set go to JEMH>Event Listener>Directive JEMH> Notifications >Directive Sets and select Create Directive Set and enter the directives shown in the screenshots below. 

...

Then in JEMH Configuration > Notifications > Jira user notification Project Mapping > Event Template Selection set the template to be your custom template set.

...

Step

...

4: Validate the email was created.

Run a test case (more information here: Use a TestCase for quick testing) to validate that approval links are being generated.

...

Step 3: Create a velocity snippet to add Directive Set links to your Adhoc Template Set.

You can follow the previous documentation: https://thepluginpeople.atlassian.net/wiki/spaces/JEMH/pages/3439984645/Driving+JSM+Approvals#Step-3%3A-Create-a-Custom-Template-Set-to-the-related-Events.if you are adding to a template set the difference being adding the velocity snippet to an Adhoc template set rather than an issue event template set.

...

Note

Ensure that only one recipient is present which the approver user picker customer field. This ensures that only the intended user receives the approval.

For a post function adding to the Custom Content or selecting an Adhoc template set containing the following velocity snippet:

Code Block
##retrieve approver user from user picker custom field configured in your JSM Approvals
#set($approvers = $customFieldManager.getCustomFieldObject("customfield_10122").getValue($issue))
#foreach ($approver in $approvers)
    #set($approverUser = $approver)
   ##Check if#set($approverEmail jira user is an approver
  #if($myApproversCustomField.contains($recipientUser)= $approver.getEmailAddress())
    #set ($approverUserKeyId = $approver.getKey())
#end 
##generate directive set links 
#if($approverUser != $null)
    #rowWrapperNormal("#generateDirectiveSetLink('Approve', $userKeyId$approverUserKeyId, 1, 3)")
    #rowWrapperNormal("#generateDirectiveSetLink('Reject', $userKeyId$approverUserKeyId, 2, 3)")
  #end
#end