Error Creating JIRA Issue

Environment: JIRA 5.2, SQL Server 2008 database, evaluation copy of JIRA

We have a test instance of JIRA. Several weeks ago I created a test project and issue. When I went in recently to edit the issue I got an error regarding a key conflict on "ID" column. I created 2 new projects and tried to create new issues for them, but got a similar error:

Exception while executing the following:INSERT INTO dbo.jiraissue (ID, pkey, PROJECT, REPORTER, ASSIGNEE, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (The INSERT statement conflicted with the FOREIGN KEY constraint "FK_jiraissue_fileattachment". The conflict occurred in database "JiraTest", table "dbo.fileattachment", column 'ID'.))

I deleted the original issue and tried to create a new one, in any of the 3 projects, but still received the same error.

It seems to be some kind of corruption in the database, especially since I can't change the ID value directly. Is this a known issue with a resolution?

2 answers

0 votes
Timothy Chin Community Champion May 17, 2013

Not sure whether this will help but try the database integrity checker (

Hi Timothy. Thanks for the helpful suggestion. Unfortunately (fortunately?), all tests passed. Stiil, good to know about this handy tool.

So does anyone in JIRA support have any idea why I might be getting this foreign key violation? We are dead in the water with our test until this gets resolved.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,780 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot