I expected this code to make the field mandatory for "Issue Type" = QA or when "Task Type" field is "analysis" or Code Review" for rest of issue types.
Its is working for the change in "Task Type" field values, but not working for "Issue Type" = "QA"
What am I doing wrong?
def selectCFValue = getFieldByName("Task Type").getValue()
def targetField = getFieldByName("SVN Path")
def issueType = getFieldByName("issuetype-field").getValue()
if (issueType == "QA")
targetField.setRequired(true)
else
if (selectCFValue == "Analysis" || selectCFValue == "Code Review")
targetField.setRequired(true)
else
targetField.setRequired(false)