Download PDF
Download page Jira Automation Tips.
Jira Automation Tips
Catching a Reporter's Email in Jira
By default, every ticket is submitted under the name "CustomerC" since we do not store client data in Jira. However, you can find the name and email of the person who submitted the ticket by following these steps:
- Click on the "Customer Portal" tab in the Jira details.
- Click on the "Author" link.
A more efficient way to capture customer details is to add them to an additional field in the Jira ticket and automatically insert the customer's email upon ticket creation. Let's consider adding the customer's email as a label on the ticket.
- Go to the project settings, find the automation tab, and create a new rule
- When Issue is created → Then create a variable ccAuthorEmail with the value {{issue.properties."cc.user".email.split(" ").first}} → And Edit issue fields (in our case, it's the label field) → {{ccAuthorEmail}} → Save the rule
Every time a ticket is created on the portal linked to this Jira project, the customer's email will be added to the ticket's label. This will also help in filtering tickets more efficiently.
Change a Ticket's Status
- Go to the Project settings as it's shown in the picture
- Select the Automation tab
- Press the Create Rule button
- Set a trigger on the Issue commented option
- Set the condition for the rule to the Issue fields condition as follows:
- Set another Advanced compare condition that defines the comment's name to avoid transitions in case the first comment will be made by a customer. Use the following Smart Value: {{comment.author.displayName}}
The second value should be an agent's name - Add the Transition issue action
- Define the Destination status as In Progress or the one that corresponds to your workflow
Note that this rule will be triggered even if your answer was added in the Comments section.
Follow up on a Customer for the First Time
You can set up an automation rule that follows up on your customers if they forgot to answer you.
- Perform the first three steps in the Change a ticket's status automation rule
- Set a trigger to Scheduled
- Configure it to run every day
- Set the exact time
Check the Run a JQL search and execute actions for each issue in the query checkbox
- Specify (read as find) those issues that need to be answered with JQL. In the example, the following JQL searches for issues that are in the In Progress status and were updated more than 1 day ago:
status = "In Progress" AND updated > -1d
You can specify a time period that meets your company's SLA for following up on a customer.
Updated in the JQL covers any change to the issue. So if a comment was added or a field was edited, the issue will be considered updated, even though the status did not change.
6. Add the Advanced condition to check the last commenter. It must be your agent. Use the following Smart Value: {{issue.comments.last.author.displayName}}
7. Add the Send email Action. Add your portal email address to the To field. Use the following smart value to keep the issue key in the Subject: {{issue.key}}.
Since the automatic message will be sent directly to the portal, the message will be created by the CustomerC user.
8. Click Save and don't forget to Run the rule
Follow up on a customer for the second time
This scheme works when a previous message was created with the help of the previous automation rule. It is a certain text in a comment's body that triggers this rule.
- Perform the first five steps in the Follow up on a customer for the first time automation rule
- Specify (read as find) those issues that need to be answered with JQL. In the example, the following JQL searches for issues that are in the In Progress status and were updated more than 10 days ago:
status = "In Progress" AND updated > -10d
You can specify a time period that meets your company's SLA for following up on a customer for the second time. - Add the Advanced condition to check the last commenter. This time, it must be CustomerC. Use the following Smart Value: {{issue.comments.last.author.displayName}}
- Add another Advanced condition to check the last comment's body. It must contain the line from your last automatic message. Use the following Smart Value: {{issue.comments.body}}
- Add the Send email Action. Add your portal email address to the To field. Use the following smart value to keep the issue key in the Subject: {{issue.key}}. This time, you should modify a little bit content of a new message. It will help to automate the next rule. For example, you can add to the previous automation message the word 'again'.
- Click Save and don't forget to Run the rule
Close a Ticket
- Perform the first three steps from the Follow up on a customer for the second time automation rule
- Add another Advanced condition to check the last comment's body. It must contain the line from your last automatic message. Use the following Smart Value: {{issue.comments.body}}
- Add the Send email Action. Add your portal email address to the To field. Use the following smart value to keep the issue key in the Subject: {{issue.key}}. This time, you should add a message that clarifies your intention to close the ticket.
- Add the Transition issue Action with the destination staus Done.
- Click Save and don't forget to Run the rule
Follow up on Yourself (1)
It's another way to keep an eye on the tickets that might need to be closed.
- Set a trigger to Scheduled
- Configure it to run every day
- Set the exact time
Check the Run a JQL search and execute actions for each issue in the query checkbox
- Specify (read as find) those issues that need to be answered with JQL. In the example, the following JQL searches for issues that were created more than 80 days ago with the following JQL:
created <= "-80d"
You can specify the time period that meets your company SLA for closing a ticket. - Check the body of the last comment with the following Advanced condition:
{{issue.comments.last.body.replace("\n"," ")}} and paste the comment that you usually reply for following up on a client.
As an option, you may use the following Smart value to check a specific phrase in the answer: {{issue.comments.last.body}}
Then, instead of Equals condition, select Contains and specify a phrase from your typical answer in the Second value field.
- Set the action in the rule to Send email
- Specify Assignee in the To field
- Paste a smart value for an issue key in the Subject {{issue.key}}
- Paste a smart value for an issue link in the Content {{issue.url}}
- Click Save and don't forget to Run the rule
Follow up on Yourself (2)
This way is a more universal one. You can specify the following conditions in the automation rule:
- Repeat the 5 steps described in the Follow up on yourself (1) rule.
- Apply the following advanced condition to check the name of the last commentor: {{issue.comments.last.author.displayName}}. In our example, it's the Agent.
- Apply the following advanced condition to check how many days ago the ticket was made:{{issue.comments.last.created.diff(now).days}}. In our example, we find tickets that were made more than 10 calendar days ago.
- Set the action in the rule to Send email
- Specify Assignee in the To field
- Paste a smart value for an issue key in the Subject {{issue.key}}
- Paste a smart value for an issue link in the Content {{issue.url}}
- Click Save and don't forget to Run the rule
Extract information from the Jira Issue Fields
You can extract the field from the Jira issue in the answer. In our case, it is the Labels field that we will extract.
- Perform the first three steps in the Change a ticket's status automation rule
- Set a trigger to Issue transitioned
- Specify the From and To statuses
4. Set the action in the rule to Send email. In the email field you need to indicate the email of your forum that you can find in the mailbox settings.
This rule will perform every time you transition an issue from the states indicated. You can use it to mention a fixed version in the answer when the issue is implemented.
Similarly, depending on your case, you can extract other fields from the Jira issue.
For example, you can mention a username in the Labels field on issues to
- Filter tickets of a specific user (company).
- Use the field in the Jira automations mentioned above to follow up with a client.
Even though there's a way to find all the submitted tickets by a user on a portal in Jira via JQL, this way may be used as a workaround.
Link Duplicated Tickets/Ideas
Whether it's a feedback or support portal, it's handy to find duplicated tickets to:
- Assign the right individuals or teams to work on the primary ticket to eliminate redundant work.
- Summarize the activity on a feature request, enabling you to pinpoint the most in-demand ones.
- Empower your team to address client problems more swiftly by having at hand a solution-filled library of previously resolved tickets.
- Enrich your documentation by incorporating answers to the questions your customers ask most frequently, as identified by the volume of duplicated tickets.
1. Go to the Project settings of the Jira project the Customer Case forum is linked to.
2. Find the Automation tab and press Create rule button:
3. Set up the automation rule as follows.
3.1. Pick an action when the rule will be triggered. In our case, it's Issue created:
3.2. Add the Lookup tickets action to find tickets with a similar summary or description in a backlog to a newly created ticket. Use the following JQL for that:
summary ~ "\"{{triggerIssue.summary}}\"" OR description ~ "\"{{triggerIssue.description}}\""
3.3. Add the condition (If) and use the Advanced compare condition option next. Paste this smart value {{lookupIssues.size}} for comparison.
3.4. The last action is to link the tickets found in the previous step. Just paste this smart value {{lookupIssues.key}} into the unfolding list.
4. Save the rule.
5. Test the rule by creating a ticket with a similar summary or description to a ticket in the backlog. If the rule works properly, the similar tickets will be linked like so: