Check Value Of Original Estimate Field

This script prevents the worklog entry to an issue belonging to the ATP project in case the value of the original estimate field is null or zero.

import com.deniz.jira.worklog.*; def issue = worklog.getIssue(); def project = issue.getProject().key; def originalEstimate = issue.getOriginalEstimate(); def originalEstimateCheck = !originalEstimate || originalEstimate == 0; if(project == "ATP" && originalEstimateCheck){ return "Can not log work!"; }