Unable to delete unused screens due to no Delete option available

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 trying to delete unused screens, no "Delete" option is present for the screen operation. The screen is not used in any of screen configurations.

診断

JIRA will not show you "Delete" option in case of any of the following conflicts:

  • The screen is listed in any of screen configurations
  • The screen is mentioned in the descriptor for current or draft workflows

In a few cases, the administration page will not mention any screen configurations or workflows that refer the screen you are trying to delete, so it might be a good idea to cross check that manually using SQL queries.

Check for screen mentions in any screen configurations:

SELECT fss.* FROM fieldscreenschemeitem AS fssi JOIN fieldscreenscheme AS fss ON fssi.fieldscreenscheme=fss.id JOIN fieldscreen fs ON fssi.fieldscreen = fs.id WHERE fs.name = '<screen_name>'

Check for screen mentions in any screen configuration that does not exist anymore:

SELECT DISTINCT fs.id, fs.name 
FROM fieldscreenschemeitem fsi JOIN fieldscreen fs ON fsi.fieldscreen=fs.id 
WHERE fieldscreenscheme NOT IN (SELECT id FROM fieldscreenscheme)

Check for any workflows referring the screen:

SELECT id, workflowname FROM jiraworkflows WHERE descriptor LIKE '%<screen_name>%';

Check for any draft workflows referring the screen:

SELECT id, parentname FROM jiradraftworkflows WHERE descriptor LIKE '%<screen_name>%';


For Jira 7.x / 8.x to check if a screen is used in a current or draft workflow, we cannot longer use '%<screen_name>%' pattern. Workflow tables stored the screen data using the screenID and not the Screen Name. Use the following SQL queries.


SQL queries below were tested in Postgres database. If you are using another database, update the syntax compatible to your database.

Identify the id of the screen:

SELECT id FROM fieldscreen WHERE name = '<screen_name>'; 

Copy the `id` output from above query, check for any workflows referring the screen. Look for entries like "<meta name="jira.fieldscreen.id">your_screen_ID</meta>" from the descriptor column. "your_screen_ID" needs to be replaced by the `id` from above query.

SELECT * FROM jiraworkflows WHERE descriptor LIKE '%jira.fieldscreen.id">your_screen_ID<%';

Check for any draft workflows referring the screen:

SELECT * FROM jiradraftworkflows WHERE descriptor LIKE '%jira.fieldscreen.id">your_screen_ID<%';

ソリューション

There are two options to fix the problem:

  • First resolution:

All internal references to the screen must be removed for "Delete" option to appear. Use SQL queries to clean up orphan entries in case any data corruption is present in the database.  If the screen is mentioned in workflow descriptors, the descriptor itself needs to be cleaned up before a new value is assigned back to the database entity.

  • The second resolution would be to remove the screen from the workflow itself.
    • Select    > Issues.
    • ワークフロー をクリックします。
    • Select the workflow you want to change and click Edit.
    • In the Workflow Editor, click on "Show transition labels"
    • Clink on each of the transitions and look if any got the screen associated.
    • Once you find it, you need to remove the screen from the Workflow.
    • Publish the Workflow
    • JIRA will now show "Delete" option. 




最終更新日 2021 年 7 月 7 日

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

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