Error adding statuses or columns to Agile Simplified Workflow

Robert Schroeder November 19, 2013

I've created a new project and converted it to use the Agile Simplified Workflow and be managed by JIRA Agile.

When I try to add columns or statuses, I'm getting this error:

org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10004][sequence,17][description,This status is managed internally by JIRA Agile][name,Being Built][statuscategory,1][iconurl,/images/icons/subtask.gif] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus"))

It's the same error whether I'm trying "Add Status" or "Add Column". It's happening when using both Safari and Chrome.

Any ideas, please?

4 answers

1 accepted

0 votes
Answer accepted
cgauterio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2013

Hey everybody,

This is happening due to the following bug report: JRA-35857

If you have an OnDemand instance, please raise an issue with us and we can apply the fix for you!

Cheers,

Clarissa.

0 votes
heidless November 19, 2013

apologies for the over-sharing of status info. did paste it into window but it did not appear to have been pasted while composing...

0 votes
heidless November 19, 2013

Hi, I'm experiencing the same thing. Newly created board using Simple Workflow. Attempting to add a status fails with the same exception as above.

Am using OnDemand. What are my options?

I actually would prefer to primarily use statuses that already exist but only small subset seem available within JIRA Agile board though many more listed under overall status configs.

Am new to JIRA. Been browsing through many docs so far.

Any tips or pointers to docs?

Many thanks - Rob

Error

org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10003][sequence,23][description,This status is managed internally by JIRA Agile][name,qqq][statuscategory,1][iconurl,/images/icons/subtask.gif] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus"))

<form class="aui" style="margin: 0px; padding: 0px; position: relative;"><fieldset style="margin: 0px; padding: 0px; border: 0px; clear: both; position: relative;">
<label style="color: #707070; float: left; margin-left: -145px; padding: 5px 0px 0px; position: relative; text-align: right; width: 130px; word-wrap: break-word;" for="ghx-status-name">Name:</label><input id="ghx-status-name" class="text" style="color: #333333; font-family: inherit; font-size: inherit; border: 1px solid #cccccc; border-top-left-radius: 3.01px; border-top-right-radius: 3.01px; border-bottom-right-radius: 3.01px; border-bottom-left-radius: 3.01px; box-shadow: #cccccc 0px 1px 3px inset; margin: 0px; max-width: 250px; vertical-align: baseline; width: 250px; height: 2.1428571428571em; line-height: 1.4285714285714; padding: 4px 5px;" type="text" value="" maxlength="30"/>
</fieldset></form>
<button class="button-panel-button aui-button" style="background-image: linear-gradient(#ffffff 0px, #f2f2f2 100%); border: 1px solid #cccccc; border-top-left-radius: 3.01px; border-top-right-radius: 3.01px; border-bottom-right-radius: 3.01px; border-bottom-left-radius: 3.01px; color: #333333; cursor: pointer; height: 2.1428571428571em; line-height: 20px; margin: 0px 10px 0px 0px; padding: 4px 10px; text-shadow: white 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Add</button>Cancel

Error

org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10003][sequence,23][description,This status is managed internally by JIRA Agile][name,qqq][statuscategory,1][iconurl,/images/icons/subtask.gif] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus"))

<form class="aui" style="margin: 0px; padding: 0px; position: relative;"><fieldset style="margin: 0px; padding: 0px; border: 0px; clear: both; position: relative;">
<label style="color: #707070; float: left; margin-left: -145px; padding: 5px 0px 0px; position: relative; text-align: right; width: 130px; word-wrap: break-word;" for="ghx-status-name">Name:</label><input id="ghx-status-name" class="text" style="color: #333333; font-family: inherit; font-size: inherit; border: 1px solid #cccccc; border-top-left-radius: 3.01px; border-top-right-radius: 3.01px; border-bottom-right-radius: 3.01px; border-bottom-left-radius: 3.01px; box-shadow: #cccccc 0px 1px 3px inset; margin: 0px; max-width: 250px; vertical-align: baseline; width: 250px; height: 2.1428571428571em; line-height: 1.4285714285714; padding: 4px 5px;" type="text" value="" maxlength="30"/>
</fieldset></form>
<button class="button-panel-button aui-button" style="background-image: linear-gradient(#ffffff 0px, #f2f2f2 100%); border: 1px solid #cccccc; border-top-left-radius: 3.01px; border-top-right-radius: 3.01px; border-bottom-right-radius: 3.01px; border-bottom-left-radius: 3.01px; color: #333333; cursor: pointer; height: 2.1428571428571em; line-height: 20px; margin: 0px 10px 0px 0px; padding: 4px 10px; text-shadow: white 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Add</button>Cancel

Error

org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Status][id,10003][sequence,23][description,This status is managed internally by JIRA Agile][name,qqq][statuscategory,1][iconurl,/images/icons/subtask.gif] (SQL Exception while executing the following:INSERT INTO public.issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL, STATUSCATEGORY) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_issuestatus"))

<form class="aui" style="margin: 0px; padding: 0px; position: relative;"><fieldset style="margin: 0px; padding: 0px; border: 0px; clear: both; position: relative;">
<label style="color: #707070; float: left; margin-left: -145px; padding: 5px 0px 0px; position: relative; text-align: right; width: 130px; word-wrap: break-word;" for="ghx-status-name">Name:</label><input id="ghx-status-name" class="text" style="color: #333333; font-family: inherit; font-size: inherit; border: 1px solid #cccccc; border-top-left-radius: 3.01px; border-top-right-radius: 3.01px; border-bottom-right-radius: 3.01px; border-bottom-left-radius: 3.01px; box-shadow: #cccccc 0px 1px 3px inset; margin: 0px; max-width: 250px; vertical-align: baseline; width: 250px; height: 2.1428571428571em; line-height: 1.4285714285714; padding: 4px 5px;" type="text" value="" maxlength="30"/>
</fieldset></form>
<button class="button-panel-button aui-button" style="background-image: linear-gradient(#ffffff 0px, #f2f2f2 100%); border: 1px solid #cccccc; border-top-left-radius: 3.01px; border-top-right-radius: 3.01px; border-bottom-right-radius: 3.01px; border-bottom-left-radius: 3.01px; color: #333333; cursor: pointer; height: 2.1428571428571em; line-height: 20px; margin: 0px 10px 0px 0px; padding: 4px 10px; text-shadow: white 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Add</button>Cancel
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2013

No worries. If you are using OnDemand please do contact Atlassian Support as per my comment above. ;)

0 votes
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2013
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2013

Try the following:

  1. Create an XML backup of JIRA (always do that before modifying the database!);
  2. Shutdown JIRA;
  3. Run the following update against the database:
    update SEQUENCE_VALUE_ITEM 
    set seq_id = (SELECT max(id::integer)+1 FROM issuestatus)
    where seq_name = 'Status'; 
  4. Restart JIRA and try to add it again.
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2013

Try the following:

  1. Create an XML backup of JIRA (always do that before modifying the database!);
  2. Shutdown JIRA;
  3. Run the following update against the database:
    update SEQUENCE_VALUE_ITEM 
    set seq_id = (SELECT max(id)+100 FROM issuestatus)
    where
    seq_name = 'Status';
  4. Restart JIRA and try to add it again.
Robert Schroeder November 19, 2013

Thanks, Matheus. But we've got an OnDemand account. Is this something we can actually do? If so, could you direct me to directions on how to access the database like this? (Apologies for my ignorance!)

Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2013

aahh, in this case you'll probably want to open a support case in https://support.atlassian.com under the OnDemand Support Project, and they'll be able to do it for you (read: you do not have access to the database in OnDemand).

If you want though, you can possibly try adding the status multiple times. That is, altough you'll see an error message each time you try to add it, the sequence will be increased in the database, and you'll eventually be able to add it with no problems (how many times you'll need to do this will depend on the amount of statuses you have).

My advice is to stick with the first option though. :)

Suggest an answer

Log in or Sign up to answer