Set a custom transition according to the issue type

Maxime Lemanissier December 3, 2012

Hi all,

I have several issue types in Jira (5.1.5) and I need for each a custom workflow. Each workflow has its specificities (for instance, requires a test step, or a validation by end-user, etc), but except these additional transitions/status, all workflows are quite similar.

I would like to avoid creating a specific workflow for each issue type and use custom conditions instead,

but it seems there is no transition condition based on the issue type.

How this could be done?

I checked Jira Suite Utilities plugin, it adds some conditions but not on the issue type. Maybe I could use its "Value Field Condition"?

I also found some documentation about writing your own condition code here: https://developer.atlassian.com/display/JIRADEV/Custom+Workflow+Condition+Skeleton

But developing/maintening a jira plugin for having a transition condition on the issue type seems a bit overkill to me. I guess I could write these few lines of code but maybe there are simpler alternatives?

Maxime

2 answers

1 accepted

3 votes
Answer accepted
C_ Faysal
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.
December 3, 2012

i just added a "Value Field" condition to a transition where i chose "issue type" and set = to an existing one.

which makes the transition only available if the issue type is (in my example) a story.

any other issue type won't show this transition

if you need some of your transitions for more than one issue type simply add a condition for each

if you need the transition for example for 8 of 10 issue type then you'd better choose != for the 2 types you want to leave out.

onkeldom
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.
December 3, 2012

C. Faysal is right. I did this once - works great!

Maxime Lemanissier December 3, 2012

Yes, i've just tested this and it also worked for me.

Many thanks.

MattS
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.
August 24, 2015

You can compare the issue type using a String and the name of the issue type, not the id. Nice one!

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2012

I'm afraid the "simple alternative" really is to use separate workflows by issue type. That's assuming you don't want to do any coding.

You could still write a condition to work by issue-type (I suspect the script runner would let you do this quite easily), but there isn't one out there that I've seen.

Suggest an answer

Log in or Sign up to answer