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

This widget could not be displayed.


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.

This widget could not be displayed.
Joe 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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

144 views 2 0
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