HI,
So I have the below script (which i saw in the community) working in my regular/software jira but it's not working on my service desk portal. Any idea/help?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.AttachmentSystemField
import webwork.action.ActionContext
def attachmentFiles = ActionContext.request?.getParameterValues(AttachmentSystemField.FILETOCONVERT)
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_22112")
log.warn(customField)
def CFvalue = (String)issue.getCustomFieldValue(customField)
log.warn(CFvalue)
if(CFvalue == "Yes" && attachmentFiles.size() < 2) {
return false
}
else {
return true
}