How to count the number of times an issue was reopened using Automation for Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

robotsnoindex

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

At times, there could be a requirement to see how many times an issue (task, bug etc.) has been reopened without a need to create a specific reopen status in the workflow but a field that would either show whether the issue was reopened or not or how many times it got reopened.

Environment

  • Jira Server/Data Center 8.0.0 or any higher version
  • Automation for Jira (A4J) 7.4.0 or any higher version

Solution

  1. Create a custom field named Reopen Count with the Number type and set the default value to 0
  2. Create an Automation Rule as described below:

    • Add the trigger Issue Transition to fire if an issue transitions from Done > To Do (Select the transition status as per the workflow definition)

    • Add the action Edit Issue fields to update the value of the custom field ReOpen Count with the below smart value,

      {{#=}}{{issue.ReOpen Count}} + 1{{/}}

  3. Make multiple transitions on an issue from the status Done > To Do, and observe that the ReOpen Count custom field value keeps being incremented by 1 (in the example below, the issue was transitioned 3 times):


Last modified on May 30, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.