Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I have a custom field in Jira and it is a drop down (Yes, No)
Now based upon the answer of this custom field, if Yes, then make another custom field (text unlimited) required.
custom field - Fiance Change (Yes, No)
custom field - Finance Approval (free form text field unlimited)
How do I make the Finance Approval custom field required if the drop down value of Finance Change is set to Yes?
I don't have any scripting knowledge and I don't see an easy way to create this behaviour.
Add this script to the finance change field, apply behaviour to project:
def finCf = getFieldByName("Finance Change") def appCf = getFieldByName("Finance Approval") appCf.setRequired(finCf.getValue() == "Yes")
Hi Jamie,
The mandatory field in my side is JIRA System field "Linked Issues", I tried your script but it doesn't work, do you have any idea? Thanks
def A = getFieldByName("Root Cause") def B = getFieldByName("Linked Issues") B.setRequired(A.getValue() == "Caused by Defect Fix")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same issue!!, please help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie - I'm using the solution you provided above, BUT I'm seeing something that I'm assuming is a bug. All initially seems to work fine except when I delete the contents of the field that's required it makes the field required when it shouldn't be (See Use Case below).
I'm hoping you have a solution on how to workaround it.
I have these two custom fields created...
The following script is associated with the Issue Blocked field...
def blockedCf = getFieldByName("Issue Blocked") def reasonCf = getFieldByName("Reason Blocked") reasonCf.setRequired(blockedCf.getValue() == "Yes")
Steps to reproduce the issue:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I'll have a look... cheers for the issue, the screenshot is very clear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Along the lines of the original request....I need to do the following: system field - fixVersion custom field - Detected in Version (single version picker) custom field - Reason for Deferral (multi-select list) How do I mandate Reason for Deferral custom field if fixVersion does not match Detected in Version? Null value should be excluded from the mandate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does something need to be different if the cf is a scripted field? I am using following, where "Version Control" is a scripted CF that can contain "Deferred" or "In Scope" as values...this doesn't do anything. def versionCf = getFieldByName("Version Control") def reasonCf = getFieldByName("Reason for Deferral") reasonCf.setRequired(versionCf.getValue() == "Deferred")
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.