Ticketnumbers not consecutive

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

This widget could not be displayed.
Thomas Schlegel Community Champion Sep 07, 2017

Hi Paul,

do the tickets between 1477 and 2658 exist?

no, the tickets does no exist

Thomas Schlegel Community Champion Sep 07, 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/#/

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 Champion Sep 07, 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 Spaniol - could you then please have a look at that issue? 

This widget could not be displayed.

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

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.

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.

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!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

565 views 25 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you