Allowing only specific State Change options to display in dropdown based on current state

Answered

Hello all,

I am looking to limit the options for State change based on the current State the ticket is in. 

For example, If I have a ticket that is in the "In Progress" custom State I would like to have the dropdown when changing the State only display the "On Hold", "QA", or "Closed" custom States.  I am trying to set up a flow and selecting any options outside of those would upset the process. 

Any ideas on the best way to achieve this if it is at all possible?

Thanks!

5 comments
Comment actions Permalink
Official comment

Hello KenH, you can write a workflow with a State-machine rule: https://www.jetbrains.com/help/youtrack/incloud/7.0/Workflow-Rules.html#Statemachine

When you attach this workflow to your project, the dropdown should only contain the allowed transitions.

Please let me know if you have any further questions.

Comment actions Permalink

Updated:

So I managed to find a way to get this to work somewhat.  It is not limiting the display but throws an error if the state field being changed to has an old value that is not acceptable.  (Please see screenshot)  This appears like it will work but I am still wondering if there is a better way to do this?

Thanks!

0
Comment actions Permalink

That example was great and helped me TREMENDOUSLY!  Thank you so much!

0
Comment actions Permalink

Will this same StateMachine setup work for if I have 2 different fields and I want the 2nd field to show only items related to what was selected in the 1st field?

Example: 

Field 1=Client, Field 2=Product

In Field 1, I select Bob's Burgers

In Field 2, I only want to see products related to Bob's Burgers

0
Comment actions Permalink

Hello Ken, it's not possible in YouTrack yet, please vote for this feature request in our system to increase its priority and be notified of the updates: https://youtrack.jetbrains.com/issue/JT-24315

Thank you.

0

Please sign in to leave a comment.