[Groovy] how to validation custom field value Jira


how to validation custom field value Jira 
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.opensymphony.workflow.InvalidInputException

/** * Created by Ozdemirce */
MutableIssue myIssue = issue;
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("kontrolEt")

if (customField == null){
    invalidInputException = new InvalidInputException();
    return;
}
def cfValue = myIssue.getCustomFieldValue( customField );
if(cfValue == null ^ cfValue ==''){
    invalidInputException = new InvalidInputException();
}

Yorumlar

Bu blogdaki popüler yayınlar

Bir Yazılımcının karşılaşabileceği Mülakat Soruları Karşılaştıklarım

[Java] Append Nedir

WebSocket Nedir?