My current script isn't working at all. It doesn't even look like the behavior is being triggered.
I'm attempting to make 3 fields--Supplier (10132), Live Date (10343), and MPAN/MPR (10256)-- mandatory when one of the following selections is selected from the Ticket Category (10123) drop-down list:
const changedField = getChangeField(); // List of ticket categories that will trigger the requirement const requiredCategories = [ "Commissions - Missing Payment/Incorrect Payment", "Commissions - Supplier Payment Terms Query", "Commissions - Commission Statement Query", "Commissions - Update Brokerage Info", "Commissions - Received commission clawback" ]; // Check if the changed field is the Ticket Category field and if the selected value is in the requiredCategories list const isRequired = changedField.getType() == "com.atlassian.jira.plugin.system.customfieldtypes:select" && changedField.getName() == "Ticket Category" && requiredCategories.includes(changedField.getValue().value); // Set the required status for the specified custom fields getFieldById("customfield_10256").setRequired(isRequired); getFieldById("customfield_10343").setRequired(isRequired); getFieldById("customfield_10132").setRequired(isRequired);
See Behavior set up screenshots below:
Hello
If you are trying to use it in "Jira Service Management", it does not work since it is not supported yet for that type of project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.