Hi, i'll tried this but my result is still failed
if (cfValues["Product gap (w/o contingency, md)"] != null) || if (cfValues["Product gap (w/o contingency, md)"] != "0") { if (! cfValues["TOMS Modules"]) { return false } } true
@Mahesh S hi, thanks for solution.
But this issue still unresolved.
Please look at my scenarios:
My numeric field is empty, but select list is still required
How it should in this case: rule: if number is empty that select field should be not required
Try this script.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.IssueImpl import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue IssueManager issueManager = ComponentAccessor.getIssueManager() CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager() CustomField myCustomfield1 = customFieldManager.getCustomFieldObjectByName("Product gap (w/o contingency, md)") String myCustomfield1Val = (String) issue.getCustomFieldValue(myCustomfield1) CustomField myCustomfield2 = customFieldManager.getCustomFieldObjectByName("TOMS Modules") String myCustomfield2Val = (String) issue.getCustomFieldValue(myCustomfield2) if((myCustomfield1Val != null) || (myCustomfield1Val != "") || (myCustomfield1Val != "0")) { if((myCustomfield2Val == null) || (myCustomfield1Val == "")) { return false } } return true
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.