Restarting JIRA issue count

AJ Kakar January 11, 2018

This is my first time using JIRA so I was testing out the different issues you can create and etc. After creating the issues I went ahead and deleted them to create other new issues in align with the project. The problem I am having is that the issue count is starting off from the last issue (DS10) instead of DS1. The count didnt reset after deletion of the test issues.

Could someone please walk me through resting the count? I saw few post on SQL queseries to reset the count but I am still very confuses on where to plug these queries in. I am not a global admin in JIRA if that changes anything.

3 answers

1 accepted

4 votes
Answer accepted
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.
January 11, 2018

You can't do this in the UI, you have to either code something (script) or amend the database directly.SQL is probably the quickest and easiest approach, and it's one of the few relatively safe things to do in a Jira database.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2018

If you're using Jira Cloud, you don't have a means to access the SQL database at all. 

However if you are using Jira Server, it might be possible to hack at the database to adjust this as described in the KB How to reset the project counter after moving issues.

Like # people like this
AJ Kakar January 11, 2018

thank you both for the quick responses and yes I am currently on the JIRA cloud service. So I guess the only option would be to deleting the project and restarting. 

2 votes
Jan Szczepanski
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2021

Hi all,

actually you can reset the project key when using scriptrunner. Here is the snippet, but be careful when using it ;)

https://bitbucket.org/janszczepanski/workspace/snippets/oBkRLy 

Ines B. July 2, 2023

would it be possible to have the script? The link does not seem to work anymore. Thanks!

0 votes

Hi Everyone!

 

We are currently configuring the test project and now it is time to move it to an instant production, we import the system with the deleted incidents, but the account does not start at 1, could you indicate which would be the query to execute in the Micosoft SLQ database? server 2016 to reset the incident account?

 

Regards

 

Milena G

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.
July 22, 2018

It's a column in the "project" table.  I can't remember the name off the top of my head, but it is pretty obvious when you look at it (Something like pcounter).

However, do not change it back to 0 without checking the other places the the issue key is used.  Specifically, in Jira without any add-ons, you need think about moved issues and all the text fields which might have had an issue key typed into them.  If you have any add-ons, you may need to consider their AO tables as well.

Hi @Nic Brough -Adaptavist-

 

 

at this time, the production site was installed and the idea now is to migrate all the configuration of the test instance, but without the incidents that were created from the tests, how could this process be carried out properly and that does not affect the configuration?

 

Reggards

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.
July 24, 2018

Jira does not have a way to carry configuration from one system to another, so it's either a large cup of coffee and a manual copying, or you can use one of the add-ons that can export and import config.

I'd use Project Configurator to get the configuration across from one system to the other.  I am biased on that one - I work with Pepe and the migration and development teams who are working with and on it, so it's the natural choice for me.  There are other options of course, and I am particularly fond of Bontron's Configuration manager if you want another opinion.

Thanks

 

After importing with the add-on  Project Configurator, what is the script that must be run in the database (Microsoft SLQ server 2016 ) to resume the incident count?

 

Regards.

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.
July 24, 2018

It's a column in the "project" table.  I can't remember the name off the top of my head, but it is pretty obvious when you look at it (Something like pcounter).  Just set it to 0

Suggest an answer

Log in or Sign up to answer