Forums

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

Can I conditionally display/require a field in a transition?

Siobhan Kelleher January 7, 2025

I'm looking for a way to incorporate a conditional check of a field value during a transition and displaying an additional required field (or skipping that step if the condition is not true) and need some help. To be clear, my only option is to use things built in to Jira so please do not offer paid plugin-related answers.

So, I have an existing transition between Code Complete and Ready for QA called "Needs QA" where the engineer is prompted to complete certain fields (like Fixversion, QA Required? and Testing Details) before they can proceed.

I would like to also check if a yes/no field "X enabled?" is filled out, but only for issues with a specific value in a custom field "ABC Team" = X. So basically issues that have have ABC Team != X can skip this and those that have ABC Team = X need to also chose a value (yes or no) for the "X enabled?" field.

Is there a way to do this in one step for users with ABC Team != X, without creating a new status or a new workflow? I've poked at a few things but am not figuring it out.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
January 7, 2025

Hello @Siobhan Kelleher 

Is the field you want to check expected to be filled in within the transition screen, during the transition? Or is the field expected to be set prior to attempting to change the issue Status?

If the former, there is no native functionality to do that.

If the latter, maybe something can be done with native functionality involving using multiple transitions and setting a Condition on the transitions to determine which on should be available based on that field you want to check.

Let us know if it is the former or latter scenario you are trying to build.

Siobhan Kelleher January 7, 2025

Thanks for your response. I basically want to have the condition evaluated and the choice made if appropriate before it can transition to the Ready for QA status. I'm fine with it being two steps in cases where the condition requires filling out the additional field. Not sure that fits neatly into either of your scenarios.

Trudy Claspill
Community Champion
January 7, 2025

Does your workflow support transitioning to the "Ready for QA" status from any status other than "Code Completed"? If so, do these same restrictions need to apply, or is it only on the transitions between those two statuses?

If only for the transition between those two statuses then you may be able to accomplish this with two transitions and two transition screens.

 

Create transition #1 between Code Completed and Ready for QA.

- Add a Condition to that transition for field "ABC Team" = "X". That transition will display only when ABC Team=X.

- Create a transition screen that includes your required fields plus the Yes/No field you also want to require.

- Add that transition screen to this transition.

- Add a Validator to this transition to confirm the Yes/No field has been filled in, as well as the Validators for the other required fields.

 

 

Create transition #2 between Code Completed and Ready for QA.

- Add a Condition to that transition for field "ABC Team" != "X". That transition will display only when ABC Team != X.

- Create a transition screen that includes your required fields but not the Yes/No field you also want to require.

- Add that transition screen to this transition.

- Add the Validators for the other required fields.

Siobhan Kelleher January 7, 2025

Thank you! I'll give this a try. 

Siobhan Kelleher January 7, 2025

Okay, I think I have it set up right, but now there are two options showing in a ticket to send it to ready for QA - one is the original, which allows me to just transition through without filling out the new required field, and the other which stops me if that field is not filled out. Users are not going to reliably know which they should use. It is possible to have it only showing one transition option? Having two they need to choose from makes the condition check moot.

Trudy Claspill
Community Champion
January 7, 2025

Did you add the Conditions to the workflow transitions as I specified?

With those conditions only one transition or the other should display, based on the value of the ABC Team field.

Siobhan Kelleher January 8, 2025

I did, but will double-check against your instructions

Trudy Claspill
Community Champion
January 8, 2025

If you can,

- share the workflow diagram with us,

- details of the conditions you have applied on each transition

- if both transitions are showing for a given issue, can you show us enough of that issue to show the content of the ABC Team field.

Siobhan Kelleher January 9, 2025

AH - I figured out what I was missing. I only had a condition on one of the transitions, but I needed it on BOTH. Now it's working perfectly. Thank you so much!

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events