Jira Database does not autoincrement remotelink primary key

Hey guys,

i tried to insert multiple remotelinks for a few thousand issue via database.

Everything worked fine, when i started Jira and checked the issues, each one has a correct working web link.

But now, when i try to create new web links out of jira, i get DataAccessExeption with the message that there is a duplicate entry for remotelink id 10000.

I know that remotelink id 10000 is the first starting id. So i started my inserted remotelinks with 10000. In database i now have remotelinks with ids from 10000 to 15000.

How can i tell jira to use 15001 as next remotelinkid and not 10000? so that i avoid duplicate entry error?

P.S. Reindexing didnt work. Also i could not find any information in database why jira wanna use the 10000 as next id.

1 answer

1 accepted

This widget could not be displayed.

You should *never* mess with an Atlassian database if you don't understand it in full.

I would go back to the backup you took before you did this, as you could now have corrupted quite a lot of things across your instance.

I totally accept your answer even if its not answering my question.

I made changes in database before i totally know whats the consequences.

But just as information for people that are like me, ive found a solution.
In the Jira Development Docs i found information about the database-schema and the sequence_value_item table. didnt recognized that before cause its "hidden".  docs say the following:

The SEQUENCE_VALUE_ITEM table

The SEQUENCE_VALUE_ITEM table is used to record, in a database independent way, the maximum ID used in each of JIRA's database tables

The implication of this is that if you want to manually insert records into JIRA database tables, you must update SEQUENCE_VALUE_ITEM yourself. Set the relevant rows' SEQ_ID values to a value greater than the actual maximum ID in the table. You will then need to restart JIRA to ensure all database caches are reset.

So i had to update the value for "RemoteIssueLink" and now everything is working fine.

And the other things you might have damaged?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

119 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you