Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-13738

JIRA generates dangerous DELETE FROM CONFIGURATIONCONTEXT WHERE... clause

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.1.3
    • None

    Description

      Our jira suffers from a bug that resets the issue type schemes of a lot of projects to the default one. After consulting with the support (https://support.atlassian.com/servicedesk/customer/portal/22/JSP-268659) i was able to find out the root cause: a dangerous DELETE.. WHERE ... statement:

      com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM configurationcontext WHERE FIELDCONFIGSCHEME=? (Deletion from CONFIGURATIONCONTEXT is forbidden!!!))
      
          com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM configurationcontext WHERE FIELDCONFIGSCHEME=? (Deletion from CONFIGURATIONCONTEXT is forbidden!!!))
          	at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:305)
          	at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.removeByAnd(WrappingOfBizDelegator.java:157)
          	at com.atlassian.jira.issue.context.persistence.FieldConfigContextPersisterImpl.removeContextsForConfigScheme(FieldConfigContextPersisterImpl.java:89)
          	at com.atlassian.jira.issue.context.persistence.CachingFieldConfigContextPersister.removeContextsForConfigScheme(CachingFieldConfigContextPersister.java:122)
          	at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.updateFieldConfigScheme(FieldConfigSchemeManagerImpl.java:242)
          	at com.atlassian.jira.web.action.admin.issuetypes.pro.AssociateIssueTypeSchemes.run(AssociateIssueTypeSchemes.java:134)
          	at com.atlassian.jira.web.action.admin.issuetypes.pro.AssociateIssueTypeSchemes.doExecute(AssociateIssueTypeSchemes.java:110)
          	at com.atlassian.jira.web.action.admin.issuetypes.pro.SelectIssueTypeSchemeForProject.doExecute(SelectIssueTypeSchemeForProject.java:204)
          	at webwork.action.ActionSupport.execute(ActionSupport.java:165)
      ....
      

      Please note the WHERE clause - it will deleted all issue type associations that share the same issue type scheme. The "..forbidden.." message is from the trigger I created in order to debug the issue:

      create trigger CONF_CONTEXT_GUARDIAN
      on CONFIGURATIONCONTEXT for delete as
      begin 
      	rollback transaction
      	raiserror 17000 'Deletion from CONFIGURATIONCONTEXT is forbidden!!!'
      end
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            aa1cc56303ab Svetlin Zarev
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: