How to delete issue type schemes that are not associated with any projects from the database

Still need help?

The Atlassian Community is here for you.

Ask the community

The information in this page relates to Database Manipulation in JIRA. Consequently, Atlassian Support cannot guarantee to provide any support for the steps described on this page as database manipulation are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

Purpose

Users would like to manually delete the issue type schemes from the database instead on the JIRA UI

Solution

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Do not delete the Default Issue Type Scheme even though it is not associated to any projects

  1. Run this SQL query to fetch the list of issue type schemes that are NOT associated to projects :

    select id, configname 
    from fieldconfigscheme 
    where fieldid = 'issuetype' and id not in (select fieldconfigscheme from configurationcontext where customfield = 'issuetype');

    (info) This will list Issue type schemes that are not associated to a project


  2. To delete issue type scheme run this query :

    delete from fieldconfigscheme where id = XXXXX;


  3. To delete multiple entires at a time run this query :

    delete from fieldconfigscheme where id in (XXXXX,XXXXX);

    (info) Replace XXXXX with the id of the issue type scheme which is not associated to any project from SQL query in Step 1.

  4. Restart JIRA for changes to come into effect. 


Last modified on May 28, 2019

Was this helpful?

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