Assets: Managing roles in Object Schema leads to error

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

While configuring an Object Schema, opening the tab to manage the roles leads to the error "Something went wrong. Contact administrator"


In the atlassian-jira.log, you may find an entry like this:

2023-11-27 13:17:09,194+0100 http-nio-8542-exec-25 ERROR admin 797x1052x1 12ybxyv 0:0:0:0:0:0:0:1 /rest/insight/1.0/config/role/99 [c.r.j.p.i.c.w.a.r.exception.mapper.DefaultMapper] Unexpected exception was thrown while processing the request
java.lang.NullPointerException
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.role.RoleAssemblerInJira.assembleRoleActorEntry(RoleAssemblerInJira.java:56)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.role.RoleAssemblerInJira.lambda$assembleRoleEntry$0(RoleAssemblerInJira.java:46)

Environment

Jira 5.4.1 or later

Diagnosis

To find the cause, check on the database using the following query:

select * from "AO_8542F1_IFJ_ROLE_ACTOR" afira, "AO_8542F1_IFJ_ROLE" afir 
where afir."OBJECT_SCHEMA_ID" = <schema_id> and afira."ROLE_AOID" = afir."ID";

 Substitute <schema_id> with the id of the Object Schema showing this issue. 

All queries were written and tested on PostgreSQL. Other DB products might need syntax adjustments, and your setup might require database name and schema to be provided for table names.

If your database is case sensitive, and any query returns an error related to the table not found, please observe if, in the database, the queried table name is capitalized or in lowercase.

Cause

At least one of the rows returned by the query will show an empty TYPE_PARAMETER . The value should be either a Userkey (for example, JIRAUSER10000) or a Groupname (for example, jira-administrators).

This looks similar to JSDSERVER-12193 - Getting issue details... STATUS however, the bug has been fixed and invalid users can no longer be added to the roles. At this moment it is unclear how the invalid situation can be created. If you have any reproduction steps that lead to this situation, please submit them to Atlassian Support.

Solution

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

The incorrect row can be deleted or updated with a group name or a user key to fix the situation.

To delete:

delete from "AO_8542F1_IFJ_ROLE_ACTOR" where "ID" = <ID from diagnosisquery>

To update:

update from "AO_8542F1_IFJ_ROLE_ACTOR" set "TYPE_PARAMETER" = <group_or_user> where "ID" = <ID from diagnosisquery>

Substitute <ID from diagnosisquery> with the ID from the Diagnosis Query that holds the empty cell.
Substitute <group_or_user> with a valid user key or group name.


Last modified on Nov 29, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.