Forums

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

Where does Jira store the highest ID value for entries in table customfieldoptions?

Wolfgang Geithner July 25, 2018

The title mostly tells it:

Where does Jira store the highest ID value for entries in table customfieldoptions? 

Background:

I added entries to table customfieldoptions via imports to the backend-DB. To do this in an efficient way I set the ID column of customfieldoptions to IDENTITY column (not so good idea).

This leads in the first place to the effect that you get a "Oops 500 technical problem..." error. If you switch the identitiy column feature off, one gets a "Duplicate key" error, as JIRA has somewhere an internal counter which counts the IDs of customfieldoption rows. I see that JIRA increates the value it sends to the database. Where is that value stored?

1 answer

1 accepted

0 votes
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.
July 25, 2018

I would roll back the changes you've made to the last good backup, as hitting the identity column is a disaster and could have done all sorts of damage.

Once you've got a reliable database back though, yes, you have the right idea if you want to do this the bad way (You should never never write to a Jira database.  If you must, then it absolutely must be backed up and shut down first), then there is a table called sequence_value_item - the counters in there are pretty obviously named, and you don't need to be precise, just as long as you set the count higher than (current + new line count) - it tolerates gaps in the sequences fine.

Wolfgang Geithner July 25, 2018

I solved that brute force as I didn't have a backup:

I performed n-times (about 500 times) manually the "add Option" -> Error -> Back cycle, so the counter on webserver-side was in sync with the DB again. Now it works.

Suggest an answer

Log in or Sign up to answer