Microsoft Teams for Jira has the same OAuth key and ID after migration

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

問題

After restoring an XML backup into a new instance, the Microsoft Teams for Jira configuration page retains the OAuth key and Jira ID from the original instance.

診断

  • After creating a new application link, the Jira ID from the original instance is provided as part of the integration:

  • Uninstalling and reinstalling the app (or recreating the application link) does not resolve the problem.

原因

The integration data is stored within the database and is not cleared when removing the app or application link.

ソリューション

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

To clean the Jira Server database from tables generated by the app, run the following scripts:

MS SQL Server
DECLARE @cmd varchar(4000)
DECLARE cmds CURSOR FOR
    SELECT 'drop table [' + Table_Name + ']'
    FROM INFORMATION_SCHEMA.TABLES
    WHERE Table_Name LIKE 'AO%APP_KEYS' OR Table_Name LIKE 'AO%TEAMS_ATLAS_USER'

OPEN cmds
WHILE 1 = 1
    BEGIN
        FETCH cmds INTO @cmd
        IF @@fetch_status != 0 BREAK
        EXEC(@cmd)
    END
CLOSE cmds;
DEALLOCATE cmds
MySQL
SET @tables := NULL;
SELECT GROUP_CONCAT(TABLE_NAME) INTO @tables FROM information_schema.tables
WHERE TABLE_NAME LIKE BINARY 'AO%APP_KEYS' OR TABLE_NAME LIKE BINARY 'AO%TEAMS_ATLAS_USER';

SET @tables = IFNULL(CONCAT('DROP TABLE ', @tables),'SELECT NULL;');
PREPARE stmt1 FROM @tables;
EXECUTE stmt1;
DEALLOCATE PREPARE stmt1;
Oracle
BEGIN
   FOR c IN ( SELECT table_name FROM user_tables WHERE table_name LIKE 'AO%TEAMS_ATLAS_USER' OR table_name LIKE 'AO%_APP_KEYS' )
       LOOP
           EXECUTE IMMEDIATE 'DROP TABLE ' || c.table_name;
       END LOOP;
END;
DROP SEQUENCE AO_A07C39_TEAMS_ATL2031287131;
DROP SEQUENCE AO_A07C39_APP_KEYS_ID_SEQ;
Postgres
DO
$do$
    DECLARE
        _tbl text;
    BEGIN
        FOR _tbl  IN
            SELECT quote_ident(table_name)
            FROM   information_schema.tables
            WHERE table_name LIKE 'AO%APP_KEYS' OR table_name LIKE 'AO%TEAMS_ATLAS_USER'
            LOOP
                EXECUTE        'DROP TABLE ' || _tbl;
            END LOOP;
    END
$do$;



説明 Microsoft Teams for Jira has same Jira ID after migration
製品Jira, Jira Core, Jira Software, Jira Service

最終更新日 2023 年 5 月 22 日

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

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