Number of interactions in a ticket using Automation for Jira

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

This article instructs how to create a custom field that counts the number of interactions (changes in statuses) in a ticket using Automation for Jira.

Solution

Creating the "Interactions" custom field

  1. Select > Issues.

  2. Under FIELDS, select Custom fields.

  3. Click Create custom field. Make sure to select All to view the available field options.

  4. Select Number type and click Next.

  5. Add the details for your field.

    1. Name: Interactions

    2. Description: Hold the number of interactions in the ticket.

  6. When you have entered the field details, select Create.

  7. Add the new custom field to one or multiple screens by ticking the corresponding box and click Update.

Creating and configuring the Automation Rule

To create a new rule:

  1. From your service project, select Project settings > Automation.

    • In a team-managed service project, select Service project settings > Automation.

  2. Select Create rule in the top-right corner.

  3. Configure the trigger settings and select Save.

Once your rule is created, you can edit its details at any time from the rule details.

To configure the rule:

  • Select the trigger: Field value changed

    • Fields to monitor for changes: Status

    • Change type: Any changes to the field value

    • For: All issues operations

      • Ideally, you select this option to get all changes in a ticket but you can filter out to your need.

    • Click Save

    • Example:

Automation trigger "field value changed"
  • (Optional) Add a new component: User condition

    • Add this condition if you don't want to get changes made by Automation.

    • User: User who triggered the event

    • Check to perform: is not

    • Criteria: Automation for Jira

    • Example

Automation rule user condition
  • Add a new component: Edit Issue

    • Select Interactions field in the

      Choose fields to set... select field.

    • In the Interactions field, place the following Smart Value:

{{#increment}}{{issue.Interactions}}{{/}}
  • Click Save

    • Example

Edit field interactions in automation
  • Give a name to your Automation rule.

  • Click Publish / Turn it on

The final result should be something similar to this screenshot:

Automation rule to count transitions on a ticket

Updated on June 11, 2024

Still need help?

The Atlassian Community is here for you.