[Groovy] How to check Comment is required ? workflow validation


How to check Comment is required ?

Groovy Script is below..

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.comments.Comment
import com.opensymphony.workflow.InvalidInputException

/** * Created by OzdemirCe on 19.02.2016. */
MutableIssue myIssue = issue;
def comments = ComponentAccessor.getCommentManager().getComments(myIssue);
if(comments == null ^ comments.size() < 1 ){
    invalidInputException = new InvalidInputException();
    return;
}

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?