Script Runner Version: 6.56.0
Jira Data Center 8.22.6
We have created several Behavior Script using Script Runner. The Behavior Scripts work but in the atlassian.log I am seeing the error below on the "Create Issue" event.
Script failed on issue (Create Issue) Cannot get Property Issue type on null object
How do we fix this?
What is the script causing this issue ? You seems to use the function getIssueTypeObject or getIssueTypeId on an issue object that is not defined.
You should use the code below instead.
getIssueContext().issueType.name
At issue creation the issue you are creating do not exist yet, context does.
Regards
I was using the following:
def issue = getUnderlying issue()
def issueType = issue.IssueType
if(issueType.name == "DR)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes but issue do not exist yet when you are on the create screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
so do I change def issueType = getIssueContext().issueType.name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.