PROBLEM:
After configuring a custom email via a postfunction rule (for CAB approvals) the workflow buttons configured in the email template preview are different to those displayed when the email is generated.
GOAL: to have Approve Reject workflow buttons display in custom email as they do in the email template preview
STEPS
1. On the transition that leads to the CAB approval status create a post function rule > Script Post-Function (ScriptRunner) > Send a Custom Email
2. Capture all required fields but in the Email template field capture
The ${issue.issueType.name} <a href = "${baseUrl}/browse/${issue.getKey()}">${issue.getKey()}</a> with priority ${issue.priority?.name} is ready for Production.
<br><br>
Please approve for Production Deployment.
<br><br>
${getWorkflowButtons.call()}
3. Preview the email template and the workflow buttons that display will be "Approve for Deploy" and "Reject". This is correct and what I'm looking for
4. Publish the workflow, move an issue into the CAB approval status (triggering the post function rule) and view the email that is sent
RESULT
Workflow buttons in email show "Cancel" and "Close"
EXPECTED RESULT
Workflow buttons in email show "Approve for Deploy" and "Reject" as they do in the email template preview
OTHER CONSIDERATIONS
- The Approve for DEploy and Reject workflow buttons correctly display when viewing the Jira issue in Jira - see below
- The Cancel and Close workflow buttons are the only 2 statuses configured to have all statuses be able to transition into them. The reason they don't display when viewing the jira issue itself is I have conditions setup on them not to display when the status was the CAB approval status. I did this as I didn't want the approval email being polluted with any other workflow buttons other than "Approve for Deploy" and "Reject".
Seems like somethings incorrect that fact that the preview and email are displaying differently?
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.