Integrity checker should fix invalid references from field configuration to field configuration scheme

XMLWordPrintable

    • 1
    • 6

      Summary

      From time to time, Jira's fieldlayoutschemeentity table has abandoned references from a field configuration to a field configuration scheme.

      Steps to Reproduce

      Apart from manually deleting field configuration schemes from the database, it's not clear how this issue can be reproduced.

      Expected Results

      The integrity checker should remove missing references.

      Actual Results

      The integrity checker should remove missing references from the fieldlayoutschemeentity table.
      The following error is logged:

      com.atlassian.cache.CacheException: com.atlassian.jira.exception.DataAccessException: No FieldLayoutScheme found for id 22601
      

      Workaround

      DELETE statements are to be used at your own risk and aren't supported by Atlassian.
      Take a database dump before deleting rows from your database.

      Delete the missing references:

      DELETE FROM fieldlayoutschemeentity WHERE scheme NOT IN (SELECT id FROM fieldlayoutscheme);
      

            Assignee:
            Unassigned
            Reporter:
            Arbi Dridi
            Votes:
            8 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: