Workflow transition or Switch workflowscheme

Whenever I transition a issue from one status to another status, I get this error:

Could not move to history step for #21255: root cause: while inserting: [GenericEntity:OSHistoryStep][owner,null][caller,jira-admin-contractor][dueDate,null][stepId,11][actionId,11][finishDate,2015-01-06 17:42:13.371][id,28822][startDate,2013-07-16 19:51:20.0][entryId,21255][status,Not Done] (SQL Exception while executing the following:INSERT INTO OS_HISTORYSTEP (ID, ENTRY_ID, STEP_ID, ACTION_ID, OWNER, START_DATE, DUE_DATE, FINISH_DATE, STATUS, CALLER) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate entry '28822' for key 'PRIMARY'))


The same exception also occurs when I switch one workflowscheme to another workflowscheme for a project.

Unable to trace out this error at database level.  What went wrong  in database?

2 answers


The cause of above issue is due to JIRA tracks workflow transition history via the OS_CURRENTSTEP and OS_HISTORYSTEP tables.  Due to the sequence_value_item being reset, old ID values were re-assigned, resulting in duplicate errors.


Please refer below link for solution







Thanks Satyendra. I have seen these links. My query is when there are other objects listed in Sequence_value_item table there is no entry for OSHistoryStep in the sequence_value_item table. How Jira picks the next number from the sequence_value_item table when inserting records into OS_historystep table?

Hi Krishnan, Have you tried with the given solution on the link? Please follow the step it will solve you problem.

Thanks Satyendra. I have been working at the DB end. The xml in the jiraworkflows descriptor column has mismatched status id. when I changed those status id to the correct ones, the issue got resolved. To my surprise, there is no entry for OS_Historystep, os_historystep_prev in the sequence_value_item. Moreover this link helped me in understanding the OpenSymphony table relationship in jira workflows.

0 votes
Joseph Pitt Community Champion Jan 06, 2015

I suggest you open an issue with Atlassian support.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,166 views 5 10
Read article

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