Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,294,690
Community Members
 
Community Events
165
Community Groups

How can I delete safely entries in jiraworkflows table?

Started with messages in the jira-atlassian log that there was duplicates in the table for one workflow. I can see in the audit log that indeed it was created 3 times in the same second.

Now I can't see the list of my workflows in the admin/workflows page and I can't access any workflow scheme ( get message "The Jira server was contacted but has returned an error response. We are unsure of the result of this operation." and in the log:

2020-05-29 18:42:24,359 https-jsse-nio-443-exec-49 ERROR bayonap 1122x2164668x3 1oe49qb 172.18.155.214 /rest/projectconfig/latest/workflowscheme/HHWS6 [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: java.lang.IllegalStateException: There are more than one workflows associated with 'X Ray Test Workflow' in the database!

com.atlassian.cache.CacheException: java.lang.IllegalStateException: There are more than one workflows associated with 'X Ray Test Workflow' in the database!

at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:211)

at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:162)

at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.getWorkflow(CachingWorkflowDescriptorStore.java:64)

at com.atlassian.jira.workflow.JiraWorkflowFactory.getWorkflow(JiraWorkflowFactory.java:33)

 

I tried full reindex, Integrity checker (said all is fine with the database) without any change.

I opened a ticket with Atlassian support GHS-189956 they mentioned  JRASERVER-40009 which is similar problem on jiradraftworkflows.

However I was expecting a bit more support from them.

I need to clear the database from that workflow but I don't suppose deleting the 2 extra rows for the workflow in jiraworkflows should be enough, I expect I should also clean the tables that describe the workflow. Would someone be able to point me towards the proper tables? I have a copy of the production database in development environment and would like to find quickly the proper correction. 

1 answer

0 votes

Not sure how safe this truly is (hopefully Atlassian weighed in on your ticket), but when faced with a similar error, we found that renaming the duplicate workflow in the jiraworkflows table was sufficient to clear the error so we could safely delete the inactive workflow(s) via the UI (which then, I'm assuming, safely deleted it recursively as needed within the database itself).

Using the query from JRASERVER-40009, you can target the active workflows table instead (jiraworkflows) to identify duplicate workflows by name (alternatively, just run a select statement using the workflow name you have above) and rename one of them using UPDATE and the appropriate workflow ID - see below example statement but double check against your column names.

update jiraworkflows set workflowname = 'Your String here' where id = XXXX

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,239 views 35 44
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you