Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate ticket create but different Key Id

Kalyan Kumar Das
Contributor
April 17, 2019

I am facing an issue for duplicate ticket create. The scenario  is given below: 

1. when the user fill the form and clicking the submit button  more than one time as per the user input then the system is allow to create more than one ticket as per the user click the submit button more than one time but key id is unique.

2. If user fill the form and clicking the submit button one time then the system is allow to create only one ticket.

Is there any way on script runner that if the user click the submit button one time then system is not allow to click more than one time.

I don't know how the java code workflow is going on.

Somebody can help me on this.

 

I am using 4.3.4 version

 

 

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2019

Hi Kaylan,

If I understand your problem here, you are seeing two different issues that have the same issue key (such as ABC-123), but different id values in the database.  This was a known problem for old versions of Jira such as yours before 4.4.5.  There is a KB about this problem over in Duplicate issue keys during highly concurrent user operations.

This article also provides a SQL query you can run to identify these issues in your system:

select pkey, count(pkey) from jiraissue group by pkey having count(pkey)>1;

The preferred solution would be to upgrade Jira to 4.4.5 at least.  This is a key upgrade version, higher versions would also contain the fix, but there are some major changes in Jira 4.4.x versions in regards to how user accounts are handled, so it's an important version to go to anyways.

There is also a work-around you could try, if for some reason you absolutely could not upgrade, as a means to prevent this problem happening again.

Workaround

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

  1. Shut down JIRA
  2. UPDATE the database rows that have duplicate keys with new values (Max value in DB + 1).
  3. Run the following against the database to prevent future duplicates:

    alter table jiraissue add constraint pkey_constraint_check unique (pkey);
    
  4. Start JIRA back up and reindex the instance.

Personally I would recommend the upgrade to 4.4.5 to prevent this.

I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer