...
Code Block |
---|
import com.atlassian.jira.security.groups.GroupManager import com.atlassian.jira.component.ComponentAccessor def cfm = ComponentAccessor.getCustomFieldManager() def issue = worklog.getIssue() def endDateField = cfm.getCustomFieldObject('customfield_11300') //custom field id of date field we are interested def endDate = endDateField.getValue(issue) as Date if(endDate){ if (worklog.getStartDate() > endDate + 1){ return "You can only log time before or during ${endDate.format('dd.MM.yyyy')}" } } |
Don't Allow a User to Log Overlapping Worklogs
...