How to make a transition go to a conditional destination

Esther Strom, ACP-JA August 13, 2013

I'm a PHP developer, but have inherited our Jira maintenance thanks to the admin leaving the company. I'm VERY new at this, so please bear with me. I wasn't able to find anything in the documentation about this.

We have a workflow called Development, with several issue types (bug, story, epic). These all follow the same workflow - when the Pass Code Review transition occurs (user clicks a button), the ticket is moved into In QA status. When the Pass QA transition occurs, it moves the ticket to In Staging status.

Main workflow

We now need to add a new issue type - hotfix - that bypasses several statuses (including In QA). Do I need to create a completely separate workflow for this issue type? Or is there a way to make the transition conditional, so that if the issue type is Hotfix, when the ticket hits Pass Code Review, it will skip In QA and go to In Staging?

1 answer

1 accepted

1 vote
Answer accepted
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.
August 13, 2013

Well, the short answer is that you don't. A transition only has one end-point, by definition.

What you can do:

Have many transitions that have conditions on them. For example, if you need to bypass all the QA stuff sometimes, have a transition from code review directly to staging. Add conditions like "only the project lead can do this"

If you need to bypass QA for "tasks" then yes, you've got the right idea - create a new workflow for tasks only, one that has no QA steps in it

A third option for the conditional transitions is a bit more complex - say you want to go to status X or Y depending on what the user puts into field Z during the transition. I've seen (and made a lot of money repairing) systems that try to subvert the end of the transition. It does not work. What does work is to create a transition from X to Y, and then catch the "transition to X" in a "Listener", scan it to check whether it should land on X or Y and then push it to Y if necessary.

Esther Strom, ACP-JA August 13, 2013

When you say "create a new workflow for tasks only", I'm assuming you're using "tasks" in place of my specific issue type (hotfix)?

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.
August 13, 2013

Sorry, yes, I was generalising. Create a new workflow for "hotfix" only

Esther Strom, ACP-JA August 13, 2013

Thanks. This is all very complicated!

Suggest an answer

Log in or Sign up to answer