Forums

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

Updating vname in projectversion table not updating the version names

Varnika Bisht December 20, 2020

Hi Team,

We have many projects in the system and one version is named differently in every project. To standardize we want to keep same nomenclature of one version in all projects. since updating at project level was tough, we thought to update from backend using query

update projectversion

set vname = <new value>

where vname = <older value>

The update is successful. However the tickets are reflecting older values as well as the version available at project also has older name. Does anyone know how can we achieve this?

3 answers

0 votes
Varnika Bisht December 21, 2020

It works after system is restarted. We are just changing version names and don't see any efficient way to do this.

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.
December 21, 2020

Mmm, that's because of caching. 

You almost certainly have corrupted your database now, you really should go back to a backup.

Using SQL to do this is absolutely not an "efficient" way to do this - I don't think it can be efficient to run the SQL and then spend weeks trying to fix the data you've damaged.

0 votes
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.
December 21, 2020

You should never write to a Jira database.

You've run into one of the reasons whay - you don't really understand the data structure in there and you've neglected some of the changes you needed to do to make this work.

There's a good chance that you have corrupted your database, so you really should roll it back to the backup you took before you did this.  (Shut it down, restore the database dump, restart and re-index in full)

Then look at making your changes via the API - for the internal one, using a plugin you write, or a scripting or automation app, or look at the REST API admin functions or CLI

0 votes
Walter Buggenhout
Community Champion
December 20, 2020

Hi @Varnika Bisht,

Have you tried to reindex Jira? 

Varnika Bisht December 20, 2020

Yes Walter, still doesn't reflect back.

Walter Buggenhout
Community Champion
December 20, 2020

That was my best guess on this. Sorry it didn't fix the issue. Maybe someone else may have additional ideas about this then.

Just as a recommendation for the future: do avoid direct database updates, even (and especially) if they seem like a quick fix. There's layers between your database and the application and missing a piece may put you in serious trouble.

Varnika Bisht December 20, 2020

Would you know an alternate way to efficiently do this update if not via database update?

Walter Buggenhout
Community Champion
December 20, 2020

It would always be better to use the API's. And I am sure several scripting or configuration tools allow you to leverage those as well.

Maybe this related question on Scriptrunner may shed some light, Jira CLI has support for it, ...

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.11
TAGS
AUG Leaders

Atlassian Community Events