Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,638
Community Members
 
Community Events
176
Community Groups

JSM Approvals by Email (with a work around)

One of my favorite (if not THE favorite) features that Atlassian has recently rolled out is the ability to do Approvals by Email within Jira Service Management (JSM). This was in response to a long outstanding feature request with many votes by users. The idea is that a JSM project workflow can trigger an email to be sent to Approvers on a ticket. This trigger typically occurs when the ticket moves into a status with a preconfigured Approval process attached to it.

screenshot3.png

In our simple JSM workflow above, the Approval is configured for the In Progress status. Meaning that when a ticket moves into that status, the JSM project will use the built in process to email the Approvers asking for an Approval to the ticket.

The new functionality now allows a project administrator to configure the JSM project to use one of a few security methods when the email is sent. My preference is the no need to sign in one. This means that the Approver will receive an email with just two choices – Approve or Decline.

screenshot4.png

The recipient of the email simply clicks on the Approve or Decline button in the email and the ticket transitions automatically to the status mapped in the workflow. In my example workflow above, Approve will result in the ticket moving to Done while Decline will cause the ticket to get Discarded.

With my security setting of no sign in, the ticket is automatically moved with no sign in to Jira required! This is great for Approvals needed by Senior Leadership, who might rarely sign into Jira or be familiar with moving around inside of tickets.

As mentioned in regards to the security settings (sign in required versus not required, etc.), you can see more guidance here: https://support.atlassian.com/jira-service-management-cloud/docs/manage-settings-for-approval-by-email/

Now that’s all well and dandy, but some folks are having a slight struggle. I can’t actually modify the email text that is sent to include custom field information. So, can I really make a decision to approve the ticket by email without knowing key information about the request?

Most of us probably fall in that category. And, thankfully, there is an open request in the JAC to have the “Ability To Add Custom Field Values to Service Desk Notification Template”. Here is the link for more information (and you can vote!): https://jira.atlassian.com/browse/JSDCLOUD-4642

Until a fix is provided, what can I do? Well, here is a work around that I have used while waiting for the initial Approval by Email option to become a reality. This process is produced by using Automation For Jira.

First is an Automation rule created based on the ticket transition from one status to another. Another rule I use is based on a new ticket created in the JSM project. So there is flexibility in the actual rule trigger. The full rule looks like this:

screenshot1.png

One of the drivers of using this approach is that I can include custom fields in my email body along with HTML code to produce the Approve and Decline buttons.

Here is the actual code/text in one of the emails I send:

{{issue.reporter.displayName}} has raised an issue.

<a href="{{issue.toUrl}}">{{issue.summary}}</a>

Additional Details: {{issue.description}}

<table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="21" align="center" bgcolor="#068000" style="-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;"><a href="mailto:jira@yourdomain.atlassian.net?subject=Re: {{issue.key}} Issue&body=I approve this ticket" target="_blank" style="font-size: 18px; font-family: Arial, sans-serif; color: #ffffff; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; padding: 10px 25px; border: 1px solid #068000; display: inline-block;"><!--[if mso]>&nbsp;&nbsp;<![endif]-->Approve<!--[if mso]>&nbsp;&nbsp;<![endif]--></a></td>

<td align="right" style="padding-left: 5px; padding-right: 5px;"></td>

<td height="21" align="center" bgcolor="#FD1B00" style="-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;"><a href="mailto:jira@youdromain.atlassian.net?subject=Re: {{issue.key}} Issue&body=I decline to approve" target="_blank" style="font-size: 18px; font-family: Arial, sans-serif; color: #ffffff; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; padding: 10px 25px; border: 1px solid #FD1B00; display: inline-block;"><!--[if mso]>&nbsp;&nbsp;<![endif]-->Decline<!--[if mso]>&nbsp;&nbsp;<![endif]--></a></td>

</tr>

</table>

Be sure to change the yourdomain to your actual value. 

Feel free to modify as you desire. This will produce an email similar to the built in JSM one above, but it includes some additional text and fields that I want to convey to the receiver of the email.

Finally, a second rule is created to cause the ticket to transition as an Approval when the user clicks on the Approve button in the email. Before I post that, I must include a VERY IMPORTANT NOTE. When the user clicks on the Approve (or Decline) button in the email, it will actually open a response email. The user at this point simply clicks send. Another caveat is that this this the process uses MS Outlook – I have not tried it with email tools such as GMAIL, Yahoo, etc.

You will also notice that the response email simply has a line that reads “I approve this ticket”. Again, the user should simply click Send and not change the text of the email. You can change that text to be whatever you like in the original email – notice in my sample code above where those words "I approve this ticket" are included and simply replace with your own wording.

The sending of the email will cause a comment to be added to the ticket as is normal Jira practice if you reply to an email sent from Jira.

Here’s the final Automation rule:

screenshot2.png

This rule will trigger when a comment is added to the ticket. We just saw above that the send of the response email will cause this comment to be added.

The If: matches condition checks for those key words associated with the Approve button of the email. When it sees those, it executes the action of an Approve of the request (an Automation new action option).

The result? The card is Approved in the system!

A final note -  I have created different rules for each JSM project to give maximum flexibility to my email text as well as reducing the number of multiple project or global Automation rule executions that take place in order to not exceed your allotment of executions for the month. It’s a simple and quick process to create the initial two rules and then copy and change for additional projects.

So let’s recap that last part in simple terms, assuming your Automation rules are in place.

  1. Some type of trigger will happen to cause your rule to be executed.
  2. The result will be that an email is sent to the Approvers on the ticket
  3. The user receiving the email will click on the Approve or Decline button, which will open a response email.
  4. The user simply clicks Send.

Please feel free to suggest changes to this process or post other solutions you may have used. My hope is that this helps make you and your team/organization a little more productive!

11 comments

Fabian Lim Community Leader Dec 20, 2021

Great article.  Thanks for all the details.

Like John Funk likes this

It is an very good article and helpful, but i have a question about the mail adress in the body --> 

<a href="mailto:jira@yourdomain.atlassian.net?subject=Re:

i think this is an example mail, which particular mail adress do i have to insert here ?

John Funk Community Leader Jun 01, 2022

Hi Stephan - yes that should be more generic @yourdomain.atlassian.net where you replace with your own specific domain name. I have edited your message to remove the proprietary name. 

Let me know how it works for you!

@John Funk This is great. I have used it with schedule trigger to send 1st and 2nd level escalation emails. Working fine for me.

Thanks.

Like John Funk likes this

@John Funk is there a way to add email body text in multi color? Tried multiple things but href="mailto is not accepting html tags within the double quotes.

Ex: body=I approve this ticket (DO NOT CHANGE THIS TEXT)

I would like to add (DO NOT CHANGE THIS TEXT) text in RED color

Like John Funk likes this
John Funk Community Leader Aug 03, 2022

Hi @Manas Bagde  - I am not an HTML expert, so I am afraid I would not be much help there. Maybe try some other sources with those skills? 

Like Manas Bagde likes this

Hi,

I believe this is a better approach for including custom fields as you still use the Approvals notification which includes the buttons.

My work around for this is as follows.

  1. Create a new Custom Field for Description. Set it render to Wiki Style
  2. Add this to the Request and Issue View of you Change Requests
  3. Remove the System Description
  4. Using Jira Automation populate the System Description with all the fields you need to include in the Email.
    1. For Example, I'm populating with custom Versions, Affected  Services, Start Time, etc.
      {{issue.Custom Field}}
  5. In the Default Customer Notifications
    1. Update the Approval Email to include ${issue.description}

Now when Approval is required I can include all information I need and adjust the information set in the System Description based on any other information. Software change would include different information to Infrastructure or Environment change requests..

If needed you can export all your issues, and import again to update the new Description field with information from the System Description before you enable the new Automatation.

 

Like Michael Fileti likes this

We recently added support for Jira Service Management approvals in Notification Assistant for Jira where we also support full customization of the email template. If you have any questions, feel free to open a support ticket at https://atlasauthority.atlassian.net/servicedesk/customer/portal/1/group/1/create/1

@John Funk 

Hello,
I implemented the solution, but when I send approval, Ali Aydın
Ali Aydın (No Response) I am getting No Response error and the transaction is not executed.
Can you assist?

Regardsno response.JPG

John Funk Community Leader Dec 28, 2022

@Ali Aydın - Your screenshot says the Status approved

Hi @John Funk  

"Approved" not set ,When I check I see that it is waiting for pending.

Regards

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events