updating workflow jira directly in databsae

doumghordi el mustapha February 26, 2018

Hello Atlassian community ,

please help me ?

in order to perform an optimized workflow migration without ID change, name créator  ... (already done  this workflow in test environment), I want to update it directly on the database (jiraworflow) but it does not work ??

is there a JIRA cache for workflow? otherwise you have ideas. I am really stuck on this problem. help me

best regrards

3 answers

4 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2018

Do not update the Jira database.  You are almost certainly going to get it wrong, and break it.

If you absolutely must do it with SQL, then you must stop Jira, back up the database, prove you can restore a Jira system from the backup you have taken, then run your SQL, restart it and re-index before letting the users in.

If you are not an expert on the internals of Jira, then consider this question:  Can you tell me all of the 6 tables (minimum - there's usually more depending on the change) you need to update and how with your SQL if you change a workflow?  If you can not do that, then you should not touch the database.

doumghordi el mustapha February 26, 2018

thank you Nic Brough , so do have any solution do update workflow in production with minimum downtime ? (import/ export xml generate a lot of problem like dublicate screen , customufiel, ) , there are no api rest ... . i 'm really stuck.

i read the architecture of jira and dependency between table so i see just one table for active workflow.

best regard

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2018

Ok, so you really do not understand the database well enough to even look at the SQL (you're not alone, it's not a simple database)

If you need to update the workflow, then edit it in the UI.  There is a draft mode that lets you change most of it.

doumghordi el mustapha February 26, 2018

Merci 

The problem here is, That all the conditions, validators and post-functions will not be migrated with the workflow. So i have to manually add all the conditions, validators and post-functions.... .

And there are a lot of modification (remplacement home made plugin for standard plugin like JSU or SCRIPTRUNNER).

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2018

Wrong, a migration will keep the same workflow, with all the conditions, validators and post-functions.

I suspect you are actually talking about something different - could you explain what you are doing?

doumghordi el mustapha February 26, 2018

thank you Nic,

I am working on an authentication modification project and the optimization of jira workflows with the standards. So, I realized several simple tasks (unification of password, reverse proxy apache, username swap, dev personnal dashboard) but for migrations of workflows I can not do them because I have an error during the import and I read that there will be more screen / custum field, so I thought if I change directly in the database I will not have to handle this problem.

Danyal Iqbal
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.
February 26, 2018

Sorry but this is a recipe for failure.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2018

If there are errors in the import, it's because you are importing something that's broken.  Making even more mess in the database is just going to make it worse (The fact you think there's only one table to update shows that you don't know enough to even start amending the database)

Please, use the UI to manage your workflows.

doumghordi el mustapha February 26, 2018

thank you Nic, i will do that , i'm so gratful for you help thank you a lot

2 votes
Danyal Iqbal
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.
February 26, 2018

This is a Bad idea. You will break the db 9 times out of 10 times. It won't work.

Try the saner route. Export/import the workflows through the Ui and let jira handle the internals.

doumghordi el mustapha February 26, 2018

thank you, 

but i have a lot of probleme with this method :

1° if i do that i risk to have dublicated customerfield and screen

2° my import xml don't work because saxexcpetion i have to put modify 4 Go entity file ...

3° i need to keep the same information in production like last modification , ...

Danyal Iqbal
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.
February 26, 2018

These are minor issues. 

1° and 2° are insignificant. 3° is not possible.

I suspect that you are talking about the xml for the complete backup, which is huge? You can export only the workflow for distribution as well.

1 vote
Steve Thornhill
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.
February 26, 2018

It is not recommended to perform these type of updates directly on the database.

Have you considered looking at additional tools such as Project Configurator which would allow you to push the changes from the test environment into production?

https://marketplace.atlassian.com/plugins/com.awnaba.projectconfigurator.projectconfigurator/server/overview

doumghordi el mustapha February 26, 2018

there are a lot of project like 200 projects so for that's reason a try to choose this solution 

Suggest an answer

Log in or Sign up to answer