Dashboard error after Jira upgrade or XML restore

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

After upgrading to a version of Jira that's 4.0 or higher, users trying to access the dashboard encounter an error message like the following (which also appears in the logs):

...
java.lang.RuntimeException: java.lang.NullPointerException
at com.atlassian.jira.dashboard.permission.JiraGadgetPermissionManager.hasProjectsPermission(JiraGadgetPermissionManager.java:164)
at com.atlassian.jira.dashboard.permission.JiraGadgetPermissionManager.voteOn(JiraGadgetPermissionManager.java:147)
at com.atlassian.jira.dashboard.permission.JiraGadgetPermissionManager.filterGadgets(JiraGadgetPermissionManager.java:70)
at com.atlassian.jira.web.action.Dashboard.getCurrentDashboardState(Dashboard.java:182)
...

Diagnosis

  • Another way to know if you may be affected by this problem is to run the following query:

    select count(*) from schemepermissions where perm_type in ('reportercreate','assigneeassignable');
    

    If that query returns a number greater than zero, then you'll need to follow the instructions in the "Resolution" section of the document to avoid permission errors when running Jira 4.0 or higher.

  • If you had used Jira Service Management earlier and restoring the XML Backup 

Cause

  1. Before the upgrade or restore, Jira was confiugured to allow either the Current Reporter Browse Project Permission or the similar permission that allows users to browse projects in which they're assigned issues. These two permission types are commented out by default since they can cause some fairly serious issues if used incorrectly.
  2. The problem caused by a bug related to Service Management permission which fixed in Jira 6.2:  JRA-36940 - Getting issue details... STATUS

Resolution for cause 1

  1. Edit the permission-types.xml file which is located in <Jira_install>/atlassian-jira/WEB-INF/classes/ directory and uncomment the following section:

    <!--  Uncomment & use this permission to show only projects where the user has create permission and issues within that where they are the reporter. -->
        <!--  This permission type should only ever be assigned to the "Browse Projects" permission. -->
        <!--  Other permissions can use the "reporter" or "create" permission type as appropriate. -->
        <!--
        <type id="reportercreate" enterprise="true">
            <class>com.atlassian.jira.security.type.CurrentReporterHasCreatePermission</class>
        </type>
        -->
         <!--  Uncomment & use this permission to show only projects where the user has the assi\
    gnable permission and issues within that where they are the assignee -->
         <!--  This permission type should only ever be assigned to the "Browse Projects" permis\
    sion. -->
         <!--  Other permissions can use the "reporter" or "create" permission type as appropria\
    te. -->
        <!--
         <type id="assigneeassignable" enterprise="true">
             <class>com.atlassian.jira.security.type.CurrentAssigneeHasAssignablePermission</cla\
    ss>
         </type>
        -->
    

    That portion of the file should look something like this after the modification:

        <!--  This permission type should only ever be assigned to the "Browse Projects" permission. -->
        <!--  Other permissions can use the "reporter" or "create" permission type as appropriate. -->
        <type id="reportercreate" enterprise="true">
            <class>com.atlassian.jira.security.type.CurrentReporterHasCreatePermission</class>
        </type>
         <!--  Uncomment & use this permission to show only projects where the user has the assi\
    gnable permission and issues within that where they are the assignee -->
         <!--  This permission type should only ever be assigned to the "Browse Projects" permis\
    sion. -->
         <!--  Other permissions can use the "reporter" or "create" permission type as appropria\
    te. -->
         <type id="assigneeassignable" enterprise="true">
             <class>com.atlassian.jira.security.type.CurrentAssigneeHasAssignablePermission</cla\
    ss>
         </type>
    
  2. Restart your Jira instance before the change will take effect.

Resolution for cause 2

  1. Stop Jira.
  2. Backup database
  3. Execute the below SQL on the database:

    DELETE FROM schemepermissions 
    WHERE perm_type = 'sd.customer.portal.only'; 
  4. Start Jira.

 

Last modified on Nov 23, 2020

Was this helpful?

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