calculate transitions

Susan Hamilton January 22, 2025

I'm trying to create an automation that tracks the number of times a story is moved from testing statuses back to in progress (development) so I can see how many times a story had to be reworked.  Another example would be how many times a story was moved from In Testing to Failed Testing to see how many times a ticket failed testing.

1 answer

3 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2025

Hello @Susan Hamilton 

Are you working in Jira Cloud or Jira Data Center?

Have you started building the automation? If so, show us what you have so far.

What do you want to do with the data when you have it?

Generally speaking Jira does not have an automation rule step that will calculate that for you. One solution is to create a custom number field for each transition that you want to track, and use Automation Rule(s) to increment that field each time a transition of that type occurs.

There are limits to how many automation rule executions are allowed each month in Jira Cloud based on your Subscription type. Does that affect your choice about using Automation Rules?

https://support.atlassian.com/cloud-automation/docs/how-is-my-usage-calculated/

Susan Hamilton January 22, 2025

Hi Trudy,

Thanks for the quick response.  My company has JIRA Cloud.  I don't currently have a rule written as I was trying to figure out how to create automation to do a calculation. 

Once I have the 'count' for how many times a story moves from another status back to in development status (like from 'in QA testing' to dev status or 'in UAT testing' to dev status) I want to be able to pull that data into a filter for reporting and then later use that data to feed into a Tableau dashboard.

I'm not aware of any limitation on the number of rules at this point but I'll check with our JIRA admin in case I need to take that into account.

Like Stefan Salzl likes this
Susan Hamilton January 24, 2025

@trudwa Does the information I provided help you, help me? :-)

Filip Tomaszewski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2025

Hi Susan,

I have done it that way, not sure if it meets your scenario, but the case I understood is:

  • There needs to be a marker for any transition back from let's say "QA in progress", "In testing" status to "in progress" or "In dev" status.
  • This is only valid for stories, other types of issues are not included in the scenario
  • Reaching the certain value (number of times Story has been sent back)should cause some kind of alert, comment or message as this is needed to inform the right person.

As mentioned by Trudy, you should first create a custom field (numeric one, with default value = 0) and named it like e.g. Rework count (let's name it that for that purpose). I think it could good to make that field restricted for manual edition. 

After creating the field and adding it to screen, we should create a rule.

You should start from the Issue transitioned block. Not sure how many statuses you are willing to track when moving back, but maybe you will need to create more rules for each scenario to keep it clear. I don't have details here :) You should test what fits best to your scenario. 

In my case I used "Issue transitioned" trigger block and configured it that way: 

From status:

  • "QA in progress" and "Ready for QA" transition

To Status:

  • "In progress"

Then I added condition block "Issue fields condition" and configured it that way:

  • Field: Issue Type
  • Condition: equals
  • Value: Story

So, now we need edit the issue field. So the "Edit Issue" action block will be perfect here.

I configured it that way:

  • Choose fields to set value: Rework Count
  • Add the smart value: {{#increment}}{{issue.Rework Count}}{{/}}

Now, we want to be sure that we will always have the latest value in the field. 

So we will need to add Re-fetch issue data block. 

Then I need to set a threshold when Stories sent back should cause alert. 

So we need to add another condition block, Issue fields condition.

I configured it that way:

  • Field: Rework count
  • Condition: greater than or equal to
  • Value: 3 (my example)

Ok, now you will have a lot of possibilities to alert the right person with email, comment, etc. 

I just added the Comment on issue block and added some text mixed with smart values to make it more informative. 

Like Susan Hamilton likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2025

Hello @Susan Hamilton 

Without a third party app you will need to:

1. Create a Custom Number Field for each type of transition you want to track

2. Create automation rules for each transition path to
- detect the transition path that has occurred
- increment the count of the corresponding custom number field

 

You can then reference those custom number fields in Filters.

With third party apps you could potentially use a workflow Post Function to increment the fields rather than using Automation Rules. That would also depend on whether the Transitions defined in the workflows were discrete enough to link to specific transition counts.

Like # people like this
Susan Hamilton January 24, 2025

Thanks so much... I'll try this.

Like Trudy Claspill likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2025

Hi @Susan Hamilton 

Just following up to check if Trudy's suggestions answered your question.  If so, please consider marking this one as "answered".  That will help others with a similar need find solutions faster.  If not, please let the community know what help you need with the rule changes.

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events