I am trying to restrict the due date field by preventing users from setting the due date 24 hours from the date that they are attempting to create the ticket. I am using ScriptRunner to create a simple scripted validator. I have been successful in preventing ticket creation with the below script, but it prevents all tickets from being created (Im guessing it might have something to do with the sql import when im using postgres, but I couldnt find a postgres equivalent).
import java.sql.Timestamp
def duedate = issue.DueDate
def noticket = new Timestamp((new Date() +1).getTime())
duedate > noticket