Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nickname55/8bb48699430afab6d2f6db58623a256c to your computer and use it in GitHub Desktop.
Save nickname55/8bb48699430afab6d2f6db58623a256c to your computer and use it in GitHub Desktop.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField
def date2 = new Date() //.plus(3)
def dateField = getFieldById(fieldChanged)
def dateValue = dateField.value as Date
dateField.clearError()
if (dateValue < date2) {
dateField.setError("Date cannot be earlier than (${date2})")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment