Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Constraint transition status on number of tickets

Ramon Masachs February 18, 2025

Hello, 
I want to add a transition constraint: 

I want to forbid transitioning a Bug ticket from In Progress to In Review if there are 10 or more bug tickets already In Review. 

I do not see how this is possible in the workflow created for Bug tickets. 

2 answers

0 votes
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.
February 18, 2025

Hi @Ramon Masachs -- Welcome to the Atlassian Community!

Adding to Trudy's ideas...

Using an automation for this scenario will reverse the transition, but it may not solve the root cause of the symptom of moving more into that status than to which the team agreed.  Instead that automation could lead to unintended consequences, such as people hiding work or not updating the Jira board as work happens.

I recommend discussing this symptom with the team at a retrospective to understand why that transition happened.  Data from the cumulative flow chart / report could be used to look at the count of issues in that status over time.  Once the team understands the root cause, they will be better able to define and try experiments to improve their work processes...perhaps eliminating the need for using a rule to undo transitions.

Kind regards,
Bill

0 votes
Trudy Claspill
Community Champion
February 18, 2025

Hello @Ramon Masachs 

Welcome to the Atlassian community.

With only native Jira Cloud functionality that sort of workflow condition cannot be created. It may be possible with a third party app. Are you open to getting such an app?

If not, an alternative is to use an Automation Rule triggered by the status transition, check if the limit has been breached, and if so automatically transition the issue back. It might also be appropriate to automatically add a comment to the issue explaining the change.

Ramon Masachs February 18, 2025

Thanks for your answer. I was trying to set an Automation Rule indeed. 
I am not sure how I can count the current number of bug issue In Review. I do not see the option to count with lookupIssues.issueType 

Trudy Claspill
Community Champion
February 18, 2025

Hello Ramon,

Please provide screen images showing your complete Automation Rule.

The Lookup Issues action enables you to execute a JQL statement to retrieve a set of issues. You could use a JQL statement such as:

issuetype=Bug and status="In Review"

When the action completes the {{lookupIssues}} smart value is a list of the issues found. One of the attributes of a list that you can access is size to get a count of the items in the list.

After the Lookup Issues action you could use a Smart Value Condition to check the size of the list:

Screenshot 2025-02-18 at 2.12.43 PM.png

Ramon Masachs February 18, 2025

I have something like this.

Not sure if it will work nor where I should link it exactly. 

 

 

 

Screenshot 2025-02-18 at 23.33.22.png

Trudy Claspill
Community Champion
February 18, 2025

That won't work.

You must use the Lookup Issues action to get the list of matching issues, not a Condition.

Screenshot 2025-02-18 at 3.24.49 PM.png

When using the Smart Value Condition your smart value must be enclosed in double curly braces.

And finally, you can't use the Automation rule to interrupt the transition. The rule will be triggered after the transitions completes. You can use the rule to reverse the transition, in which case the Transition Issue step needs to actually specify the Status value to which you want to return.

Like Bill Sheboy likes this
Ramon Masachs February 19, 2025

Thanks a lot for your answers. 

Ramon Masachs March 18, 2025

Hello Trudy, 

It has been working fine these weeks. 
However, is there a way to have an inapp notification or a popup message to notify that the transition has been reversed? 

 

Trudy Claspill
Community Champion
March 18, 2025

Hello @Ramon Masachs 

Automation rules operate asynchronously in the background and cannot provide interaction in the Jira app with the user. They cannot cause a pop-up to display in the UI.

If the Notifications configuration for the project includes notifications being generated when the status changes, that should generate an in-app notification.

You could also add a Send Email action to the rule to send a message via email to the recipients of your choice to let them know that the rule ran and reversed the transition for the specified issue.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Send-email

 

If the responses provide by me and @Bill Sheboy have helped you develop a solution for your requirement, please consider clicking on the Accept Answer buttons above our responses to mark your Question as Solved.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events