...
Code Block |
---|
def issue = worklog.getIssue(); def remainingEstimate=issue.getEstimate(); if (remainingEstimate== null || remainingEstimate == 0 ) { //no remaining estimate on issue, don't allow logging work return "Can't log work because the remaining estimate is '0' or 'Not Specified'"; } |
Don't Allow Logging Work If Original Estimate is Zero or Not Specified for Specific Project
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.
Code Block |
---|
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!";
} |
Don't Allow Logging Work Higher Than Remaining Estimate
...