[Groovy] how to set custom Field Value Post fuction Jira Groovy Script

how to set custom Field Value Post fuction Jira Groovy Script 
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue

/** * Created by ozdemirCe on 22.02.2016. * set custom field value get other field */log.error("ece~~:: Start copy value script")

MutableIssue myIssue = issue;
def cfA = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("A");
if (cfA == null){
    log.error(" custom field A is null");
    return;
}
def aValue = cfA.getValue(myIssue);
if (aValue != null){
    log.error(" custom field A value  is not null");
    def cfB = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("B");
    myIssue.setCustomFieldValue(cfB,aValue);
}

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?