Hi guys!
I'm trying to make a validator on the transition to checking a field of the date-time type. When filling it out, if the date and time are less than the current working day, a warning is displayed. If the field is empty or the next business day is specified, then perform the transition.
I tried this option:
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.issue.Issue;
import java.sql.Timestamp
def duedatetime = customFieldManager.getCustomFieldObject("customfield_11417")
def noticket = new Timestamp((new Date() +1).getTime())
if ((duedatetime > noticket) || duedate == null)
return true
but it does not work with a custom field of the date-time type.
Maybe someone has faced a similar problem, and knows how to solve it correctly?
I would be grateful for your help!