Show transition screen *conditionally* based on field value in issue

Jennifer McVicker December 8, 2017

We have a common workflow that is shared by many development teams.  When the story is completed and pushed to the "ready for release" status, developers are supposed to fill in a "deployment instructions" field, but they aren't doing it consistently on my team.  I've created a screen that has a required field for deployment instructions.  However, I don't want this to affect ALL teams, I only want it to affect mine.  There is a custom dropdown field on all story screens called "Team"; if my team is selected, I want that popup to show.  

Is this possible?  We do have ScriptRunner; I'm wondering if it might be done with that.

1 answer

1 accepted

4 votes
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.
December 8, 2017

The answer for people with no ScriptRunner is "create separate workflows"

SR people have another option - parallel transitions.  Have two transitions that go from one place to another, with similar names.  One should have the screen, the other should not.  You then place a scripted condition on each - one that says "when team = x" and the other says "when team != x".  Mutually exclusive, so the users only ever see one of the two.

Jennifer McVicker December 8, 2017

Brilliant!  Thank you Nic!

Ivan Tovbin
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 9, 2017

Is it just me or you can achieve this even without any add-ons? Create two transitions with similar names and use "User is in group" or "User in is project role" condition which is available out of the box?

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 9, 2017

It depends on the condition needed.  In the question, the condition outlined is not one you can do with "plain" Jira off-the-shelf.

Thienky Dang February 27, 2019

Unless I'm mistaken, as of currently this no longer works. It seems when you fill out the screen and then proceed to attempt the transition Jira will recognize the field has been filled out and thus block the transition.

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.
March 2, 2019

This still works as it has before, but I think you are a bit confused about what is happening here. 

You are talking about the screen and validator.  The conversation is about conditions which act before you get to the transition, preventing the transition from being offered to the user at all.

Thienky Dang March 11, 2019

I understand that, however when I had a transition with a screen and a condition, the screen would show up but the transition will be blocked once the field is inputted. The screen only worked once I removed the condition. 

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.
March 12, 2019

No, you have one transition, a screen and a validator there, not a condition.

The solution I gave is two transitions, one screen and two conditions (that are mutually exclusive, so only one transition is ever offered to the users)

A condition stops a transition being shown to a user, a validator stops it after they start the transition, so the fact you can get to your screen tells me you are using a validator.  A condition would have meant you can't even get to the screen.

Thienky Dang March 12, 2019

Ok I see now, I must have mixed up what validator went with what condition. Thank you.

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.
March 12, 2019

Yes, I think so.  I think a lot of us get them mixed up, I know I certainly did when I first started needing to do checks in workflows!

Thienky Dang March 12, 2019

I finally realized what I did wrong. I was trying to validate that my custom field was filled with a selection and not "None" however I was using issueManager which was checking the database that hadn't been updated yet. This link explains how to fix the issue. Commenting for anyone that might run across the same problem. 

roniz October 28, 2019

@Nic Brough -Adaptavist-Is it possible to put a condition on a transition to pop up a screen?

meaning- if a field A= 'xx' and I press the transition that has this condition- a pop up screen will appear.

for all other values in field A- no pop up will appear.

Like # people like this

Suggest an answer

Log in or Sign up to answer