unique constraint "AO_54307E_VIEWPORTFORM_pkey" violated on project creation

Hi,

 

In order to avoid tens of clicks on 200+ servicedesks, i executed a small SQL that adds an issue type to each servicedesk portal that does not have that issuetype (plus the fields and default values required).

 

Now, i cannot create new projects with CSV importer because :

org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "AO_54307E_VIEWPORTFORM_pkey"
Detail: Key ("ID")=(1917) already exists.

 

 

tried to create projects from GUI, same thing & same error (though, the ID increased)...

 

bouncing JIRA did not help.

 

select max(ID) from AO_54307E_VIEWPORTFORM

gave back 

max

2168

i think i need to update some sequence in the sequence_value_item table, but i do not know which one...

 

anyone able to help?

1 answer

0 vote

It won't work, you've broken your installation.

It's a nice idea about the sequence_value_item, but it's not just that, or the relations in the SD tables.

Your best option is to revert to the backup you took before you did the changes.

Thanks Nic.

 

Or i can keep trying 100 times creating new project, then be back online as cached index will go above existing limit :(

 

Then I can import my next 400+ projects...

 

SD cloning is not available and in such setup with one SD per customer project means editing 200+ / 600+ projects everytime we do an evolution of the tool. 

 

any further ideas?

 

thanks

Gabriel

Scripting the creation of Service Desks should be possible.  That would be safe, as it would go through the API

Nic, 

 

That would be great, but i'm not a developer.

 

We use ScriptRunner indeed, but i have troubles understanding the deeps of JIRA & ServiceDesk while learning a new scripting language. I have no issues with BASH & PHP, SQL & JQL, database reverse engineering, but the Groovy is too much for the time I have to do this side of my duties...

 

If the SR's Copy project builtin function would also consider SD configuration items, then it might be a good thing for us at least...

 

Even better, if SR would be able to compare 2 projects (including their SDs) and apply the delta as compared to a reference project, that'll be wonderful. it will certainly ease many admin hours...

 

still opened to suggestions on how to fix this (DB/etc).

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

784 views 5 7
Read article

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