Page tree
Skip to end of metadata
Go to start of metadata
import com.opensymphony.workflow.InvalidInputException;
import com.atlassian.jira.issue.fields.WorklogSystemField;

WorklogSystemField.WorklogValue worklogValue =
        ((WorklogSystemField.WorklogValue)issue.getExternalFieldValue("worklog"));
log.debug("worklogValue:"+worklogValue)
log.debug("getTimeSpent:"+issue.getTimeSpent())
if(worklogValue==null || worklogValue.worklogResult().getWorklog() ==null){
    if(issue.getTimeSpent() ==null || issue.getTimeSpent() <=0 ){
        throw new InvalidInputException("Please work log");
    }
}

            


  • No labels