Workflow transition or Switch workflowscheme

krishnan January 6, 2015

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

1 vote
Satyendra Narwane
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2015

Hi 

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

Workflow+due+to+Duplicate+entry+error

or 

https://confluence.atlassian.com/display/JIRAKB/Unable+to+Transition+Workflow+due+to+Duplicate+entry+error

 

Regards

Satyendra

 

krishnan January 6, 2015

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?

Satyendra Narwane
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2015

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

krishnan January 10, 2015

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 https://docs.oracle.com/cd/E27119_01/doc.11113/e23128/databaseadministratorsguideprintable43.html helped me in understanding the OpenSymphony table relationship in jira workflows.

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 6, 2015

I suggest you open an issue with Atlassian support.

Suggest an answer

Log in or Sign up to answer