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:
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.