Forums

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

How to limit a particular issue type (BUG) from moving to a specific workflow status ?

Aisha M
Contributor
February 18, 2019

I have a project with a list of different issue types. I just want on issue type (Bug) to not move through a particular status (say: Released to Production) 

So, how do I set up a condition on the workflow that only BUG wont go through a specific status ?

Thank you ! 

3 answers

0 votes
Tarun Sapra
Community Champion
February 18, 2019

Hello @Aisha M 

In JIra you can configure workflows per issueTYpe thus ideally you should have a separate workflow for the Bug type. But still if you want to have since workflow then on the transition which carries the bug to the status which you want to skip you can add the condition "issueType!=bug" and thus you can skip that transition for bug.

But you would need a plugin for adding conditions like above.

Aisha M
Contributor
February 18, 2019

@Tarun Sapra  Thank you for the comment. Actually its full live setup that's been going on for long, with close to 600 projects. So, I don't think the management would like making new workflows for different issue type and disrupting the flow at this point. :)

Can I please know how to add that condition statement and what plug in ? Thankls

0 votes
Mihai Schwarz
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, 2019

Hi @Aisha M in your situation you can put a condition on your transition. Let say that the transition from Released to Production is called In Production, put a condition where only a user or a group of users can execute that transition.


Here you have a link to advanced workflow conditions: https://confluence.atlassian.com/adminjiracloud/advanced-workflow-configuration-776636620.html


Have a great Monday!

Aisha M
Contributor
February 18, 2019

@Mihai Schwarz  Thank you for the comment.

In that case, can I please know what the condition should be >? Because, I don't find any that says to limit a particular issue type from progressing to a specific status. 

0 votes
Milan Chheda [INFOSYSTA]
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, 2019

Why not have a different workflow for BUG issue type and have a condition based on roles, JQL or anything?

If you can't have different workflow for BUG, than I believe you will have to write a groovy script to check for issue type, followed by a condition to not allowing to proceed.

Aisha M
Contributor
February 18, 2019

@Milan Chheda [INFOSYSTA]  Hi, Thank you for the reply. 

Actually, the project wise workflow has already been set up with close to 600 projects dependent on it and everything is being stabilized. So, I don't think my organization would want to disrupt anything with new changes now.

Milan Chheda [INFOSYSTA]
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, 2019

Ok, so you can use ScriptRunner add-on for JIRA. This add-on exposes a condition for workflow transitions, "Script Condition [ScriptRunner]", where you can write a custom script based on issuetype. For example, you can use below sample code to check for issuetype condition:

if(issue.issueType.name == 'BUG')
return false;
return true;
Lexi
Contributor
July 25, 2023

@Milan Chheda- i know this was from a long time ago, but i am trying to do the same thing. What else do i need to add to this script to get it to work? I still see the workflow option for the Bug issuetype:

script.png

Suggest an answer

Log in or Sign up to answer