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
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
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
2. For Advanced Logic: Consider a Third-party plugin/apps like JMWE or JSU offer advanced validators with richer conditions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.