Cannot edit default users in default members for project role in Jira
Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When going to Administration > System > Roles > Select Manage Default Members for any role and then selecting Edit for Default Users, the error is triggered:
1
2
3
4
Assign Default Users to Project Role: TEST
You can add and remove default users from the project role TEST by using the 'Add' and 'Remove' buttons below.
<< Return to viewing project role TEST
An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug.
Solution
Deleted user role membership
This problem occurs if you have a user assigned to the default user role membership that has been deleted.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
2014-12-18 09:11:28.482648500 2014-12-18 09:11:28,477 TP-Processor2 ERROR emccutcheon 551x2009x1 5as0zs 4.35.206.142,59.167.29.201 /secure/project/UserRoleActorAction.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
2014-12-18 09:11:28.482652500 java.lang.NullPointerException
2014-12-18 09:11:28.482652500 at com.atlassian.jira.web.action.admin.roles.UserRoleActorAction.getProjectRoleActorUsers(UserRoleActorAction.java:91)
2014-12-18 09:11:28.482665500 at com.atlassian.jira.web.action.admin.roles.UserRoleActorAction.getUserPickerHtml(UserRoleActorAction.java:66)
2014-12-18 09:11:28.482666500 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-12-18 09:11:28.482666500 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2014-12-18 09:11:28.482667500 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2014-12-18 09:11:28.482668500 at java.lang.reflect.Method.invoke(Method.java:483)
2014-12-18 09:11:28.482669500 at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:142)
2014-12-18 09:11:28.482669500 at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:529)
2014-12-18 09:11:28.482673500 at com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxingPropertyGet.invoke(AnnotationBoxingPropertyGet.java:26)
...
Replicating the issue
In this test, user Bob is the test user.
To add a user to a Default Member list of a role:
Admin > System > Roles.
Select Manage Default Members for any role (In the example: TEST role).
Select Edit for Default Users.
Add a user you can delete from user management (Bob).
When Bob is deleted, the user is still in the Default Member List.
To delete a user: Deleting or Deactivating Users.
It is recommended to deactivate users rather than deleting.
Fixing it through database
Jira Cloud users please file support request at https://support.atlassian.com
Please reference:
And the related Bug Ticket: JRASERVER-41312 - Cannot edit Default members of a role if user has been deleted.
1. Back up DB and shut down Jira service.
2. In DB identify the ID for the user in the projectroleactor table:
1
2
3
4
5
jira=> select * from projectroleactor where roletypeparameter = 'bob';
id | pid | projectroleid | roletype | roletypeparameter
-------+-----+---------------+---------------------------+-------------------
10601 | | 10300 | atlassian-user-role-actor | bob
(1 row)
3. Delete the Row using the ID from the query above:
1
2
3
4
5
6
7
jira=> DELETE FROM projectroleactor where id = 10601;
DELETE 1
jira=> select * from projectroleactor where roletypeparameter = 'bob';
id | pid | projectroleid | roletype | roletypeparameter
----+-----+---------------+----------+-------------------
(0 rows)
4. Restart Jira and run a full lock and re-index.
Further troubleshooting information can be found at this link: NullPointerException when editing members of a Project Role for when you don't know the user who is producing the Null reference.
Was this helpful?