unique constraint "AO_54307E_VIEWPORTFORM_pkey" violated on project creation

Gabriel MOSCALU October 10, 2017

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 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2017

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.

Gabriel MOSCALU October 10, 2017

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2017

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

Gabriel MOSCALU October 10, 2017

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
TAGS
AUG Leaders

Atlassian Community Events