Hi, i have a script that must give me a current time, but instead of this it gives me java.lang.NullPointerException.
script is here:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import java.sql.Timestamp
import static java.lang.Math.*
def issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("SEREX-2")
def Current_Date= ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Current date")
// get today's date
issue.setCustomFieldValue(Current_Date, new Timestamp((new Date() + 1).time))