When granting permissions, the Service Management Customer Portal Access Permission is missing

お困りですか?

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

コミュニティに質問

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

問題

When attempting to grant permissions in a permission scheme, the "Service Management Customer - Portal Access" grantee is missing. Alternatively, when opening a permission scheme with those permissions already in it, you receive a 500 error in the browser.

Removing the permission manually from those schemes in the database (by deleting sd.customer.portal.only entries in that scheme via the database) allows the scheme to be displayed correctly.

The following stack trace accompanies the 500 error message in the atlassian-jira.log:

2019-02-03 23:33:24,841 http-nio-8080-exec-120 ERROR aleksey.moskalyov 1413x4302x3 omre3k 10.50.15.17,0:0:0:0:0:0:0:1 /rest/internal/2/managedpermissionscheme/0 [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.NullPointerException
	at com.atlassian.jira.permission.management.ManagedPermissionSchemeHelperImpl.buildGrants(ManagedPermissionSchemeHelperImpl.java:367)
	at com.atlassian.jira.permission.management.ManagedPermissionSchemeHelperImpl.lambda$generatePermissionSchemeBean$4(ManagedPermissionSchemeHelperImpl.java:249)

(info) The ID shown in the URL (0 in this case) may change - 

Additionally, upon restarting, you may see the following appear in the atlassian-jira.log:

2019-02-04 23:13:59,123 active-objects-init-JiraTenantImpl{id='system'}-0 ERROR anonymous     [n.java.ao.sql] Exception executing SQL update <ALTER TABLE jiraschema.AO_54307E_CAPABILITY DROP CONSTRAINT U_AO_54307E_CAPABIL1680206402>
com.microsoft.sqlserver.jdbc.SQLServerException: 'U_AO_54307E_CAPABIL1680206402' is not a constraint.

(info) This problem may occur in other database types, and the constraint name may be different - the key factor is the table, AO_54307E_CAPABILITY.

診断

Check to see if the schema has been altered from the default:

CREATE TABLE
    "jira3161"."public"."AO_54307E_CAPABILITY"
    (
        "CAPABILITY_NAME" CHARACTER VARYING(255) NOT NULL,
        "CAPABILITY_VALUE" CHARACTER VARYING(255) NOT NULL,
        "ID" INTEGER DEFAULT nextval('"AO_54307E_CAPABILITY_ID_seq"'::regclass) NOT NULL,
        "SERVICE_DESK_ID" INTEGER NOT NULL,
        "USER_KEY" CHARACTER VARYING(255),
        PRIMARY KEY ("ID"),
        CONSTRAINT "fk_ao_54307e_capability_service_desk_id" FOREIGN KEY ("SERVICE_DESK_ID")
        REFERENCES "jira3161"."public"."AO_54307E_SERVICEDESK" ("ID")
    );

(info) The example is from Postgres on Jira Service Management 3.16.1, but should be reasonably similar across other database types. Note that there is a primary key, and a foreign key constraint that references another table - but no other types of constraint or index

原因

There are variations in the table structure that Jira is attempting to remove, but failing. In the example above, U_AO_54307E_CAPABIL1680206402 was a unique index, that Jira attempted to drop as a constraint, which failed.

ソリューション

Remove the variations from the table structure. It may be necessary to use a fresh installation on a test instance, to determine what the correct, default structure is for your specific database type and version.

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


説明 この
製品Jira Service Management
最終更新日 2020 年 11 月 23 日

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

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