import com.opensymphony.workflow.InvalidInputException
import java.time.LocalDateTime
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.comments.Comment
import com.atlassian.jira.issue.comments.CommentManager
import com.atlassian.jira.component.ComponentAccessor
def issue = ComponentAccessor.getIssueManager().getIssueObject("TEST-1")
def commentManager = ComponentAccessor.getCommentManager()
def comment = commentManager.getLastComment (issue)
def date = comment.getCreated()
def oneMinute = LocalDateTime.now().getMinute() - date.getMinutes()
if (oneMinute >1)
{throw new InvalidInputException( "comment required")}
but it doesn't work
Any help would be gratefully received!