Upgrading JIRA Breaks Subtasks
Symptoms
The following exception appears when browsing a parent issue which has sub-tasks:
An error occurred whilst rendering this message. Please contact the
administrators, and inform them of this bug. Details: -------
org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'getSubTaskFieldHtml' in class
com.atlassian.jira.web.util.SubTaskQuickCreationWebComponent threw
exception class java.lang.NullPointerException : null
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:246)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)
...
Looking at the logs, the following error message appears:
...
java.lang.NullPointerException
at com.atlassian.jira.issue.fields.AssigneeSystemField.makeAssigneeOptionsList(AssigneeSystemField.java:428)
at com.atlassian.jira.issue.fields.AssigneeSystemField.getAssigneeOptionsList(AssigneeSystemField.java:367)
...
Cause
User records exist inside the userbase
table but not in the membershipbase
table. One of the missing/duplicate users are inside the standard groups (jira-users, jira-developers, and jira-administrators), and one of those groups is added to the Assignable Users permission. These errors when browsing a parent issue which has sub-tasks due to this null pointer.
Resolution
To fix this problem:
- Run this SQL query:
select user_name from membershipbase where user_name not in (select username from userbase);
userbase
table but existed inmembershipbase
table. - Delete this user with the following SQL query:
delete from membershipbase where user_name not in (select username from userbase);
- Restart JIRA