Unable to Delete Issues Due to Conflict in Database

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.

*Except Fisheye and Crucible

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

Symptoms

When attempting to delete an issue, the error message "There was a system error trying to delete the issue" may appear in JIRA. Also, an error similar to the following may appear in the logs:

1 2 3 2010-08-31 11:43:40,934 http-8080-8 ERROR username 703x2493x1 pfx453 10.0.0.10 /secure/BulkDeletePerform.jspa [jira.bc.issue.DefaultIssueService] There was an exception while trying to delete the issue 'TST-1'. com.atlassian.jira.exception.RemoveException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM jiraschema.OS_WFENTRY WHERE ID=? (The DELETE statement conflicted with the REFERENCE constraint "RELATEDOSWORKFLOWENTRY". The conflict occurred in database "jiradb", table "jiraschema.jiraissue", column 'WORKFLOW_ID'.))

Cause

This occurs due to foreign key constraints in the database.

Resolution

Create and configure new database for JIRA without foreign keys. Then, restore the data by importing an XML backup into the newly created database (via JIRA).

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.