Board administrators are suddenly removed

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

問題

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

診断

  • 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");

原因

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.

回避策

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:

重要

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;

ソリューション

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.

 

最終更新日 2017 年 6 月 29 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.