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
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.
- Shut down JIRA
UPDATE
the database rows that have duplicate keys with new values (Max value in DB + 1).Run the following against the database to prevent future duplicates:
alter table jiraissue add constraint pkey_constraint_check unique (pkey);
- 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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.