So I get "Cannot invoke method getFixVersions() on null object" when applied to an issue -> issue.getFixVersions(). Anyone know why? I thought it would return empty if there's nothing.
The problem is that the issue variable is null. How do you call the script and how you initialize the issue variable?
Hello,
Thank you for answering!
I initialize the variable this way:
Collection<Version> parentFixVersions = new ArrayList<Version>()
and then set it parentFixVersions = issue.getFixVersions()
I tried to catch the error so,
if (parentFixVersions == null)
{log.warn("Null Object")}
But it still gives me the error.
I'm running this through script runner.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as I understand from your previous message the problem was with the issue variable. How do you initialize the issue variable? Where do you run the script?
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.