Ticketnumbers not consecutive

Paul Hörig September 7, 2017

since a few days our ticketnumbers are not consecutive.

 

I successively created 2 tickets. First one got ticket number 1477 next one got 2658.

 

How can i fix this?

2 answers

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 8, 2017

Hi Paul,

A number of things can cause this, so you can check in your JIRA logs or the Incoming Mail logs and see if you can search for one of the issue numbers that was skipped, and you can get some kind of idea what failed there when it attempted to create the issue.

I'm looking at another ticket right now, and one of the causes was that not all of the columns in JIRA had the right collation. See How to fix the Collation and Character Set of a MySQL Database.

Of course, this is just one of many causes, so try and look in the logs for a few of the skipped numbers and see what you can find.

Kind Regards,
Shannon

Paul Hörig September 13, 2017

Hi Shannon,

i checked my databse, but there are no errors.

 

I take a deeper look in the tables and correct the pcounter in project table.

After creating some tickets the number was randomly generated but not consecutive.

 

In the Logs i fond no errors.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 14, 2017

Hi Paul,

Are you seeing this problem happen in a single JIRA project, or in mulitple projects?   Also what database type/version are you using with JIRA (mysql, postgres, oracle, or MS SQL)?

Nic has a great summary of what can cause issue numbers to jump unexpectedly in this related thread

Holes in issue sequences happen in four ways

  1. Issues are created and then deleted
  2. Issues are created and then moved
  3. Someone stops Jira, winds the issue key count forwards in the database and then restarts Jira
  4. Someone uses a plugin to do the same as the line above (I'm not aware of any plugins that do that, but that's not to say there isn't one, or that someone has written one and used it on your installation. I think you can do it with the "script runner" as well, but I've not tried it)

In addition to these, I have seen this specific problem can happen when a mail handler gets stuck in a loop trying to create an issue from an inbound email that it can't completely process.  But if that happens, you should see something like a SQL exception in either the incoming mail log or the atlassian-jira.log around that time.

It might be helpful to try to turn up the logging levels in JIRA to try to see what commands are being issued to the SQL database when this happens.   Natively within JIRA, that pcounter value should only ever get incremented by 1 when an new issue is created.   There is no process natively in JIRA to lower that value for that project.  So unless a user is changing it, perhaps there is some plugin or other piece of code at work there that might be manipulating that value unexpectedly.

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.
September 19, 2017

The answer I gave there was written before I'd seen an email handler go haywire, exactly as Andy says.  That's reason number 5, but also the primary culprit in the cases I've seen since then!

0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2017

Hi Paul,

do the tickets between 1477 and 2658 exist?

Paul Hörig September 7, 2017

no, the tickets does no exist

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2017

Is there something in the logs? Which number is taken, if you create another issue now? 

I've never heard of such a behaviour before. 

And you double-checked that you created the issues in the same project in the same Jira instance?

I think, I would contact Atlassian's support with that:

https://support.atlassian.com/contact/#/

Paul Hörig September 7, 2017

All Issues are in the same project.

 

I tested again:

- Create 2 Issues, got ID 2864, 2865

- wait some minutes and create another issue, got ID 2688

- create issue via email listener, got ID 2870

 

Atlassian's support answere was:

As of July 10th, 2017, starter license customers exclusively receive support from our online Community....

 

I think, i delete the project and create it again and check again.

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2017

Ah, ok, did not know that you have a starter license.

If you still have these problems with the new project, please post here again.

@Shannon S - could you then please have a look at that issue? 

Suggest an answer

Log in or Sign up to answer