Hello Team,
I have two custom fields which are visible & required only in one of the issue type of a project, in rest all issue type it's not required. I am doing it using behavior.
Now there is further requirement where in, if the value of first custom field which is single select type is "Yes", second custom field which is of number of attachment type should be made required.
I am running a server side script as below, but its not working. Can someone help with it ?
def approval = getFieldById("customfield_xxxxx")
approval.setHidden(true);
def attachment = getFieldById("customfield_xxxxx")
attachment.setHidden(true);
String issueType = getIssueContext().getIssueType().getName()
if (issueType == "New Request") {
approval.setHidden(false);
approval.setRequired(true);
if ("Yes" in approval.value) {
attachment.setHidden(false);
attachment.setRequired(true); }
}
Hello Guys, does anyone have any solution to this ?
The code is fine, something was wrong with the custom field, deleted a field & created new one & it works.
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.