Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
I do some bulk insert to customfieldoption table. When I'am trying to add some custom value from UI, I get an error that id key already exist. Becouse infact exist. How to set next proper value for this algorytm?
This is why you should never write to a Jira database - 99% of the time, people get it wrong.
You should revert to the backup you took before you ran your SQL, this is the only way to get rid of some of the permanent damage you might have done to Jira.
If you insist on bodging this and risking something else going wrong later, then you need to stop your Jira, use SQL again to look for the highest numbered option (in the "id" column) in the options table, then set the options counter in the sequence table to a number at least 11 higher than that. Restart Jira and run a complete, locking re-index, followed by an integrity check. There is a good chance (but not 100%) chance this will fix it. It will if no-one has attempted to use any of the new options yet, but you may still have corrupted data in anything that has been updated since you broke the data.
Hi Krysztof,
Have your reindexed before? Jira might be a bit messed up if you have been inserting things other ways that are not the usual ones, maybe a reindex will get the right ids in order.
Regars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have broken your database, re-indexing won't help because it's just reading from broken data.
Please, restore to the backup you took before running your SQL, it's the only way to safely fix this properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.