Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to update all issues with transition state 0

arama mihai
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.
May 22, 2018

Hi,

 

We recently had some space problems, which caused new issues created to be created without workflow transitions.

I can identify all of them by doing:

 

SELECT *
FROM jiraissue
JOIN os_wfentry
ON jiraissue.workflow_id = os_wfentry.id
WHERE os_wfentry.state IS NULL
OR os_wfentry.state = 0;

 

in the database.

 

I would update all of them to a proper workflow state through the DB, but that requires downtime we cannot afford.

 

Is there a way to automatically update all the issues os_wfentry.state to 1, using Scriptrunner's console perhaps?

 

Thank you!

2 answers

2 accepted

1 vote
Answer accepted
Deleted user May 22, 2018

Hi Arama,

Have you tried to perform the following Integrity Checker in Jira?

  • Check Workflow Integrity
    • Check workflow entry states are correct
    • Check workflow current step entries
    • Check JIRA issues with null status

It probably could help you resolve the workflow transition issue without performing the manual fix in database level.

https://confluence.atlassian.com/adminjiraserver/using-the-database-integrity-checker-938847667.html

arama mihai
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.
May 22, 2018

Thank you.

1 vote
Answer accepted
Nic Brough -Adaptavist-
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.
May 22, 2018

The integrity checker is built for finding and fixing these, amongst other things (Admin -> System -> Integrity check I think.  But use the admin search if I'm wrong)

With ScriptRunner, there may be several things that you need to fix on your broken issues, the integrity check should handle them all for you.

Suggest an answer

Log in or Sign up to answer