Page tree
Skip to end of metadata
Go to start of metadata
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.user.ApplicationUser;

import com.opensymphony.workflow.InvalidInputException;



ApplicationUser user = ComponentAccessor.getUserManager().getUserByName("admin");

boolean result = true;
if(issue.getDescription()!=null)
{ 
    log.info("长度:"+issue.getDescription().length());
    if(issue.getDescription().length()>=4)
   result = false;
}

if(result == false){
    throw new InvalidInputException("字数超过三十岁");
}


  • No labels