Forums

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

Condition or Validation for transition by number of issues in destination status

Lucinda Stroud May 8, 2018

I'm working with clients and want to force them to prioritize work done on their behalf by limiting the number of issues they can transition from "New" to "Investigation" (which prompts our consultants to look into the issue and begin work).  There should be only three (3) issues in the "Investigation" status at a time within a single project.  Clients would have to reprioritize and move an issue back to "New" if they want us to work on another.

While the Kanban in JIRA lets you set a maximum number of issues in a particular column, it just turns red after the maximum is exceeded - it doesn't actually prohibit the transition.

I've looked into a few different ways of approaching this.  

  • We have the add-on Jira Misc Workflow Extensions, but none of the conditions or validations you can add are dependent on the status of other issues in the project that I can tell, except if they are linked issues
  • More may be possible using Groovy with JMWE, but that's a language that I'd need to learn.

Other thoughts on how to approach this?

1 answer

1 accepted

2 votes
Answer accepted
David Fischer
Community Champion
May 8, 2018

Actually, if you have a recent version of JMWE (the latest is 5.2.1), it's really not that hard to achieve with a Scripted (Groovy) Condition. You could do something like:

jqlSearch( "project=${issue.get("Project")?.key} and status=Investigation" ,  3).size() < 3

which will pass only if there are less than 3 issues in the same project in the "Investigation" status.

Lucinda Stroud May 8, 2018

Thanks much, David! This worked perfectly.

Suggest an answer

Log in or Sign up to answer