Board administrators are suddenly removed

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

All of a sudden, users report inability to configure boards in JIRA Software projects.

Diagnosis

  • While logged in as a JIRA System Administrator, you can see boards have the "Administrators" field blank;
  • The following query show count greater than 0:

    SELECT COUNT("ID") FROM "AO_60DB71_RAPIDVIEW" WHERE "ID" NOT IN (SELECT "RAPID_VIEW_ID" FROM "AO_60DB71_BOARDADMINS");

Cause

So far, we have managed to identify two possible causes for this problem - see issues below, both are being actively investigated by our development team.

Workaround

Working around this issue involves using the REST API to re-add users and groups as administrators in the boards. It requires a backup of the AO_60DB71_BOARDADMINS table exported at a healthy state.

Follow the below instructions to apply the workaround:

Important

This workaround was not thoroughly tested, so please make sure to create a point of restore before proceeding and also validate the changes.

The below queries were designed on and are exclusive to PostgreSQL databases.

 

  1. From the backed up table, create two new tables - one for users and another for groups:

    SELECT * INTO board_admins_users FROM "AO_60DB71_BOARDADMINS" ba WHERE ba."TYPE" = 'USER';
    SELECT * INTO board_admins_groups FROM "AO_60DB71_BOARDADMINS" ba WHERE ba."TYPE" = 'GROUP';
  2. Run the below query to generate JSON output:

    SELECT 
        '{"id": ' || ba."RAPID_VIEW_ID" || ',' || ' "boardAdmins": ' || '{"userKeys": ' || json_agg(DISTINCT bu."KEY") || ', "groupKeys": ' || json_agg(DISTINCT bg."KEY") || '}}'
    FROM 
        "AO_60DB71_BOARDADMINS" ba
        LEFT JOIN board_admins_users bu ON ba."RAPID_VIEW_ID" = bu."RAPID_VIEW_ID"
        LEFT JOIN board_admins_groups bg ON ba."RAPID_VIEW_ID" = bg."RAPID_VIEW_ID"
    GROUP BY ba."RAPID_VIEW_ID";

    Save the output of the above query to a file;

  3. Run the below script to send the updates to JIRA:

    while read in; do curl -s -k -D- -u admin:sphere -X PUT --data ${in} -H "Content-Type:application/json" http://jira.example.com/rest/greenhopper/1.0/rapidviewconfig/boardadmins
    done < boardadmins.json > changes.log

    (info) Please replace:

    • admin:sphere with the pair of username + ':' + password of an user with JIRA System Administrator permission;
    • http://jira.example.com/ with the base URL of your JIRA instance;
    • boardadmins.json with the file you saved the output of query on step 1 to;

Resolution

At this point, we don't have a resolution for this problem. Please watch the bug reports mentioned under "Cause" for further updates on this.

 

Last modified on Jun 29, 2017

Was this helpful?

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