I have Service Desk project by the name of "ABC".
In that , I have a issue type "General Request"
In General Request , I have many fields...two of the fields are Ticket Type and Job Code.
Ticket Type is a single select drop down field. (it has many values.)
Job Code is a Text field.
Now, I want a automation where whenever issue type is General request, Ticket type is Repo/Space Creation , then during closure of the ticket, Job Code should be mandate. (It should only be mandate when ticket type is Repo/Space Creation). For other values within ticket type it should work as it is.
Can someone help me with the detailed automation for this ?
Hello @Harshit Grover
Cristiano from the appfire team here.
Unfortunately, you will not be able to do this natively,
Allow me to suggest solving this issue by using Jira Misc Workflow Extensions (JMWE), you can use the Field Required Validator (JMWE app), that allows you to make a field required but with optional validation.
For you specific case, I recommend doing it like this:
issue.issueType.name == "General request" && issue.customfield_10124.value == "Repo/Space Creation"
Just remember to change the custom field value to match your instance, or the error message if you desire.
Please contact our support if you have any other questions about this validator, or JMWE in general.
Hello Harshit Grover,
I am Nacho and i am part of Decadis.
Your requirement can be solved with a jira expression validator from our app Jira Workflow Toolbox for Jira Cloud.
An expression like the following one can be used in the jira expression validator in the transition of the ticket closure:
issue?.issueType?.name == "General request" && issue?.customfield_XXXXX?.value == "Repo/Space Creation" ? issue?.customfield_YYYYY != null : true
Please, replace XXXXX with the id of the Ticket Type custom field and YYYYY with the id of the Job Code custom field id.
If you have any doubt, feel free to create a ticket in our Support portal and we will be happy to assist you.
Kind regards,
Nacho
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Harshit Grover ,
This process cannot be achieved directly using Jira Automation, as Jira Automation does not support making a field mandatory directly. In other words, it's not possible to enforce a rule through automation that makes the "Job Code" field mandatory when the "Ticket Type = Repo/Space Creation."
However, you can achieve this requirement through the following alternative solution:
Create a new custom field (for example, a field called "Dummy").
Go to the workflow used for the "General Request" issue type in your project.
On the transition where the ticket is closed, add a validator.
The validator should work as follows:
If the Dummy field is empty, allow transition (i.e. the ticket can be closed).
Then, create a Jira Automation rule:
Trigger: Issue updated, field change, or transition (depending on your needs).
Condition: Issue type = General Request AND Ticket Type = Repo/Space Creation.
Action: Automatically set the Dummy to any value (e.g., "valid").
When the Ticket Type is "Repo/Space Creation," the automation will populate the Dummy field, and the transition will be blocked (i.e., the ticket cannot be closed).
For all other ticket types, this field will remain empty, and the validator will allow the transition, so you can manually ensure that the "Job Code" field is filled before closing.
In this way, you are not directly making a field mandatory with automation, but instead, using automation to trigger a transition validator, which helps enforce the required behavior.
If the answer helps, please accept the answer.
Best regards,
Murat Seven
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, you must create a screen, add the field Job Code, and add the screen to the resolved transition.
Then, you can use the conditional validator on the resolved workflow transition. Make sure you have the JMWE plugin or ScriptRunner installed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.