Forums

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

Restrict transition based on issue type

Harold Prestage
Contributor
July 7, 2025

I am trying to setup a restriction based on issue type .e.g if an ticket is an incident and the priority is a blocker/Critical priority you cant transition to complete if the following fields are not completed, i had this setup before but its not working now, please help

5 answers

1 accepted

1 vote
Answer accepted
Evgenii
Community Champion
July 7, 2025

Hi, @Harold Prestage 

You can achieve this using conditional branches. 
Set up a condition that hides the transition from the user if the required criteria are not met.

Here’s an example:

Screenshot_59.png

Harold Prestage
Contributor
July 11, 2025

Thanks, this is how i set it up before

Like Evgenii likes this
Harold Prestage
Contributor
July 13, 2025

@Evgenii  i don't know what i'm missing but when i add the conditions and validators to the transition i lose the ability to complete service requests

  • We have use the same workflow for incidents and service requests
  • The conditions should only fire when the issue type is set to a incident and the priority is a Blocker
  • Then i want to set 4 custom fields as validators i.e root cause, risk mitigation etc


PS!! I managed to get this to work before, now when i try it doesn't work any ideas?

Evgenii
Community Champion
July 13, 2025

Hi, @Harold Prestage 

I'm not entirely sure I’ve understood the issue correctly — some screenshots of your configured conditions and validators would help clarify. But based on the information provided, here are my thoughts:

  • You can use separate workflows for different issue types. This way, changes to one issue type won't affect others.
  • Your setup sounds similar to the example I added above — where a transition is shown only if, for instance, the issue is an Incident with Critical priority, or the issue type is not Incident .
  • You can also add validators, but be cautious — if one issue type has certain fields and another doesn’t, it may cause issues with the transition. That’s why using separate workflows per issue type is usually the better approach.



Harold Prestage
Contributor
July 14, 2025

Hi @Evgenii 

As i mentioned before i had this working for a while

I think i will go with your approach of separating the workflows then it would work as expected, will also save me some time

 

The insight is much appreciated, thanks

 

 

 

 

 

Like Evgenii likes this
0 votes
Nacho Moreno Ortega
Contributor
July 9, 2025

Hi @Harold Prestage ,

I am Nacho and i am part of Decadis.

If using a third party app is an option for you, i would like to recommend an easy approach with a validator from our app Jira workflow toolbox .

 

In the transition to complete the issue, a Jira expression validator can be created with the following expression:

issue?.issueType?.name == "incident" && issue?.priority?.name == "blocker/Critical" ? issue?.customfield_NNNNN != null && issue?.customfield_YYYYY != null : true

Please, replace "NNNNN" and "YYYYY" with the IDs of the custom fields that must be mandatory.

 

If blocker and Critical are different priorities, the expression should be as follows:

issue?.issueType?.name == "incident" && ["blocker", "Critical"].includes(issue?.priority?.name) ? issue?.customfield_NNNNN != null && issue?.customfield_YYYYY != null : true

 

If you need any kind of assistance in this matter or do you have any doubt, please feel free to contact us via our support portal and we will gladly assist you.

 

Best regards & have a great day,

Nacho

0 votes
Priyanka Khare
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.
July 7, 2025

Hello @Harold Prestage 

It sounds like a workflow condition or validator isn’t working like it used to.

Check the transition in the workflow (the one going to “Complete”) and make sure you’ve got a “Fields Required” validator or a ScriptRunner/Jira Expression condition tied to issue type = Incident and priority = Blocker/Critical.

You can also double-check that the field names match exactly and the validator is active. Sometimes changes to custom fields or workflow versions break it quietly. If in case everything else fails, try re-adding the condition ,it might’ve dropped off during a workflow update.

Let me know how it goes!

Harold Prestage
Contributor
July 13, 2025

@Priyanka Khare i don't know what i'm missing but when i add the conditions and validators to the transition i lose the ability to complete service requests

  • We use the same workflow for incidents and service requests
  • The conditions should only fire when the issue type is set to a incident and the priority is a Blocker
  • Then i want set 4 custom fields as validators i.e root cause, risk mitigation etc

PS!! I managed to get this to work before, now when i try it, it doesn't work im sure im missing something

0 votes
Maciej Dudziak _Forgappify_
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.
July 7, 2025

Hi @Harold Prestage

I don't think it is possible out of the box. Did you use any apps that provided Jira expression-based validator? Or did you setup an Automation to revert the transition if condition were not met?

Cheers

0 votes
pawarsachin84
Community Champion
July 7, 2025

Hello @Harold Prestage ,

Welcome to the Atlassian Community! 😊

1. To enforce custom field completion for “Incident” issues with Blocker/Critical priority, use a Field Required Validator on the workflow transition to Done. Set a Jira expression condition like:

 


issue.issueType.name == "Incident" && (issue.priority.name == "Blocker" || issue.priority.name == "Critical")

Add your required fields and a clear error message. This blocks the transition cleanly.

Workflow Validator 

2. For Advanced Logic: Consider a Third-party plugin/apps like JMWE or JSU offer advanced validators with richer conditions.

Suggest an answer

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

Atlassian Community Events