Salto for
Jira
Articles
SHARE
Rachel Wright
May 30, 2023
5
min read
In my last post, we talked about strategies for using automation rules in Jira Cloud. Now that you know how to build, test, and maintain rules, let’s improve their capabilities with smart values!
Smart values are a low-tech way to access and manipulate issue data. And don’t worry - no programming experience is required. Smart values are simply placeholders for variable information that changes. As an example, let’s say you need to notify many users that they’ve won a contest. Instead of manually sending multiple individual emails, you can send one message and use variables to insert specific information for each winner.
In the example, the highlighted areas are variables.
You can use this same concept in Jira for comments, notifications, issue creation and more. Jira stores a ton of data, so it’s great to be able to use that info in a dynamic way. Not using smart values in automation rules is like using Jira without JQL!
Before I share some of my favorite examples, here’s a brief explanation of the structure of smart value variables.
If Jira had sent the email message above, the syntax would look something like:
To: {{reporter.emailAddress}}
Subject: Congratulations {{reporter.displayName}} - you've won!
Congratulations {{reporter.displayName}}!
You’ve won a {{issue.Prize}} and it will be delivered on {{now.plusDays(14).shortDate}}.
We’re sending your prize to the following address you provided:
{{reporter.displayName}}
{{issue.Address}}
{{issue.City}}, {{issue.State}} {{issue.Zip}}
Please let us know if you have any problems receiving your prize. Thanks for participating in our contest!
Sincerely,
The Ridiculous Example Company
The example accesses Jira’s standard issue reporter field and custom fields called prize, address, city, state, and zip. Additionally, I used {{now.plusDays(14).shortDate}} to calculate today’s date, add 14 days to it, and format the result for the delivery date.
Easy right? Well, easier than delivering a pony to an apartment at least!
Now that we’ve covered the basic syntax, here are my favorite smart values and example ways to use them.
Tip: Copy the example syntax to create your own smart value library! I store my frequently used values and functions in a disabled automation rule so they are easy to cut and paste.
Here are some real-world examples of smart values in automation rules.
When a comment is added that contains an issue key, automatically link that issue to the other issue.
Use the “Advanced compare condition” and the following:
Use the “Link issues” action and the following:
Regularly check for unverified Jira Service Management requests, mark them resolved, and leave a comment for the requestor.
Use the “Comment on issue” action and the following:
Use the “Comment on issue” action and the following:
{{/}}
Use the “Send email” action and the following:
Use the “Send email” action and the following:
Total cost: {{issue.customField_10040}}
{{/}}
* {{displayName}}
{{/}}
Now it’s your turn! Start with a simple automation rule and smart value and expand its capabilities from there.
Ideas
Tip: Use my manual trigger and log action strategies to test variables and verify results are as expected.
Salto for
Jira
Jira
SHARE
Rachel Wright
May 30, 2023
5
min read
In my last post, we talked about strategies for using automation rules in Jira Cloud. Now that you know how to build, test, and maintain rules, let’s improve their capabilities with smart values!
Smart values are a low-tech way to access and manipulate issue data. And don’t worry - no programming experience is required. Smart values are simply placeholders for variable information that changes. As an example, let’s say you need to notify many users that they’ve won a contest. Instead of manually sending multiple individual emails, you can send one message and use variables to insert specific information for each winner.
In the example, the highlighted areas are variables.
You can use this same concept in Jira for comments, notifications, issue creation and more. Jira stores a ton of data, so it’s great to be able to use that info in a dynamic way. Not using smart values in automation rules is like using Jira without JQL!
Before I share some of my favorite examples, here’s a brief explanation of the structure of smart value variables.
If Jira had sent the email message above, the syntax would look something like:
To: {{reporter.emailAddress}}
Subject: Congratulations {{reporter.displayName}} - you've won!
Congratulations {{reporter.displayName}}!
You’ve won a {{issue.Prize}} and it will be delivered on {{now.plusDays(14).shortDate}}.
We’re sending your prize to the following address you provided:
{{reporter.displayName}}
{{issue.Address}}
{{issue.City}}, {{issue.State}} {{issue.Zip}}
Please let us know if you have any problems receiving your prize. Thanks for participating in our contest!
Sincerely,
The Ridiculous Example Company
The example accesses Jira’s standard issue reporter field and custom fields called prize, address, city, state, and zip. Additionally, I used {{now.plusDays(14).shortDate}} to calculate today’s date, add 14 days to it, and format the result for the delivery date.
Easy right? Well, easier than delivering a pony to an apartment at least!
Now that we’ve covered the basic syntax, here are my favorite smart values and example ways to use them.
Tip: Copy the example syntax to create your own smart value library! I store my frequently used values and functions in a disabled automation rule so they are easy to cut and paste.
Here are some real-world examples of smart values in automation rules.
When a comment is added that contains an issue key, automatically link that issue to the other issue.
Use the “Advanced compare condition” and the following:
Use the “Link issues” action and the following:
Regularly check for unverified Jira Service Management requests, mark them resolved, and leave a comment for the requestor.
Use the “Comment on issue” action and the following:
Use the “Comment on issue” action and the following:
{{/}}
Use the “Send email” action and the following:
Use the “Send email” action and the following:
Total cost: {{issue.customField_10040}}
{{/}}
* {{displayName}}
{{/}}
Now it’s your turn! Start with a simple automation rule and smart value and expand its capabilities from there.
Ideas
Tip: Use my manual trigger and log action strategies to test variables and verify results are as expected.