Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-15924

Removing or disabling a LDAP directory containing a group — or deleting an internal group added as board administrator — breaks View All Boards function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 8.5.5, 8.9.0, 8.8.1
    • 7.3.7, 7.2.10, 7.3.8, 7.4.2, 7.2.12, 7.6.0, 7.5.4, 7.2.13, 7.6.4, 7.7.1, 7.10.1, 7.10.2, 7.13.0, 7.13.2, 8.3.3, 7.13.18
    • AgileBoard

    Description

      Summary

      Removing  or disabling an LDAP directory that contains a group that has been added as board administrator breaks 'View Board' function. This is also applied to internal group which is deleted but remains listed as Board admin. When user tried to open View Board after removing LDAP, following stack trace will be thrown in log:

      2017-06-23 17:06:09,622 http-nio-8738-exec-4 ERROR charlie 1026x1848x3 3l148v 127.0.0.1 /rest/greenhopper/1.0/rapidviews/viewsData [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
      java.lang.NullPointerException
      	at com.atlassian.greenhopper.web.rapid.view.RapidViewListHelper.buildBoardAdminsFromView(RapidViewListHelper.java:234)
      	at com.atlassian.greenhopper.web.rapid.view.RapidViewListHelper.buildListEntry(RapidViewListHelper.java:207)
      	at com.atlassian.greenhopper.web.rapid.view.RapidViewListHelper.buildListModel(RapidViewListHelper.java:156)
      	at com.atlassian.greenhopper.web.rapid.view.RapidViewListHelper.buildListAndConfigModel(RapidViewListHelper.java:105)
      	at com.atlassian.greenhopper.web.rapid.view.RapidViewListResource$2.call(RapidViewListResource.java:79)
      	at com.atlassian.greenhopper.web.rapid.view.RapidViewListResource$2.call(RapidViewListResource.java:75)
      	at com.atlassian.greenhopper.web.util.RestCall.response(RestCall.java:42)
      	at com.atlassian.greenhopper.web.AbstractResource.createResponse(AbstractResource.java:111)
      	at com.atlassian.greenhopper.web.AbstractResource.response(AbstractResource.java:91)
      	at com.atlassian.greenhopper.web.rapid.view.RapidViewListResource.getViewsAndConfigModel(RapidViewListResource.java:74)
      

      Steps to reproduce:

      1. Create a group in LDAP or create an internal group in JIRA.
      2. Add the LDAP in JIRA.
      3. Open board configuration page of any board and add the group name to the "Board Administrator".
      4. Remove the LDAP from JIRA or delete the internal group
      5. Open "View Boards" again.

      Environment

      JIRA 7.3.7, JIRA 7.3.8, Jira 7.4.2

      Expected Results

      View Boards shows all the boards available in JIRA.

      Actual Results

      View Boards does not show any boards available in JIRA.

      Workaround

      Re-enable the Crowd user directory. This has solved the issue in some cases. After doing this the directory can be disabled once again.

      Second workaround

      1. Use the following SQL query to find the group that has been added as a Board Administrator but is not available in cwd_group or resides in a disabled directory: 
        select distinct ba."KEY" from "AO_60DB71_BOARDADMINS" ba where ba."TYPE" = 'GROUP' and ba."KEY" not in (select group_name from cwd_group where directory_id in (select id from cwd_directory where active = 1));
        

        This query is for MySQL databases:

        select distinct `KEY` from ao_60db71_boardadmins where TYPE = 'GROUP' and `KEY` not in (select group_name from cwd_group);
      2. Access <http://<Your JIRA's URL/secure/admin/user/GroupBrowser.jspa> and add the groups shown in the query above to your JIRA.
      3. This will allow View Boards to display all the boards again.
        User can choose to remove the affected group from the specific boards to prevent this problem from happening when LDAP is removed from JIRA again or when the internal group is deleted from JIRA.

      Alternate Workaround

      If you are unable to re-add LDAP, you can alternatively identify the board containing the unmapped group and remove the group via the UI:

      1. Use the following SQL query to find the group which is added as Board Administrator but not available in cwd_group.
        select distinct ba."KEY" from "AO_60DB71_BOARDADMINS" ba where ba."TYPE" = 'GROUP' and ba."KEY" not in (select group_name from cwd_group where directory_id in (select id from cwd_directory where active = 1));
        
      2. Use the following SQL query to identify the boards that the group has been added to as a Board Adminstrator:
        select "NAME", "ID"  from "AO_60DB71_RAPIDVIEW" WHERE "ID" IN (select "RAPID_VIEW_ID" from "AO_60DB71_BOARDADMINS" WHERE "KEY" = '<groupnamefromquery1');

        This query is for MySQL databases:

        select NAME, ID  from AO_60DB71_RAPIDVIEW WHERE ID IN (select RAPID_VIEW_ID from AO_60DB71_BOARDADMINS WHERE `KEY` = '<groupnamefromquery1');
        
      3. Navigate to http:/<Your JIRA's URL>/secure/RapidView.jspa?rapidView=<rapid_view_id from query2>&tab=filter
      4. Hover over 'Administrators'
      5. Click to edit
      6. Remove the group

      Attachments

        Issue Links

          Activity

            People

              drauf Daniel Rauf
              vshanmugam Vicknesh Shanmugam (Inactive)
              Votes:
              95 Vote for this issue
              Watchers:
              119 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: