Change a ticket's status 

  1. Go to the Project settings as it's shown in the picture
  2. Select the Automation tab
  3. Press the Create Rule button


  4. Set a trigger on the Issue commented option
  5. Set the condition for the rule to the Issue fields condition as follows:

     
  6. 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
  7. Add the Transition issue action
  8. 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.

  1. Perform the first three steps in the Change a ticket's status automation rule
  2. Set a trigger to Scheduled 
  3. Configure it to run every day
  4. Set the exact time
  5. Check the Run a JQL search and execute actions for each issue in the query checkbox

  6. 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.  

  1. Perform the first five steps in the Follow up on a customer for the first time automation rule
  2. 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.
  3. 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}}

  4. 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}}

  5. 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'.

  6. Click Save and don't forget to Run the rule

Close a Ticket

  1. Perform the first three steps from the Follow up on a customer for the second time automation rule
  2. 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}}
  3. 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.

  4. Add the Transition issue Action with the destination staus Done.

  5. 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.

  1. Set a trigger to Scheduled 
  2. Configure it to run every day
  3. Set the exact time
  4. Check the Run a JQL search and execute actions for each issue in the query checkbox

  5. 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.


  6. 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. 

  7. Set the action in the rule to Send email
  8. Specify Assignee in the To field 
  9. Paste a smart value for an issue key in the Subject {{issue.key}}
  10. Paste a smart value for an issue link in the Content {{issue.url}}
  11. 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:

  1. Repeat the 5 steps described in the Follow up on yourself (1) rule.
  2. 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.
  3. 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.


  4. Set the action in the rule to Send email
  5. Specify Assignee in the To field 
  6. Paste a smart value for an issue key in the Subject {{issue.key}}
  7. Paste a smart value for an issue link in the Content {{issue.url}}
  8. 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.


  1. Perform the first three steps in the Change a ticket's status automation rule
  2. Set a trigger to Issue transitioned
  3. 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

  1. Filter tickets of a specific user (company).
  2. 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.