It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

1 vote
Answer accepted

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.

Brilliant!  Thank you Nic!

Ivan Tovbin Community Leader Dec 09, 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?

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

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.

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.

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. 

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.

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

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!

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. 

@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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

932 views 8 25
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you