I have created few test issues in a new project. Now I want to delete them and make the issue numbering to start from the begining, rather than the last issue's number + 1.
Is this possible with either database manipulation or just from frontend?
We use Oracle 11.2.
Write down the project's settings (schemes etc), then delete the project (which will kill all the issues as well) and then create it again with the same short code.
For database manipulation, delete all the issues in the UI first, stop Jira, get a backup (although this is unlikely to cause a fault), open up the "project" table and change the pcounter to 1 (That's from memory - it might be 0, you can check this by creating a new empty project and reading the pcounter for that from the database to confirm it)
Definitely test it :-) I prefer the db change as well myself, because I'm lazy and don't want to have to put all the schemes back.
Just make sure you have Jira offline when you do it. Project counter keys are one of the things it almost always caches, so if it's running when you make the change, you could see it wiped out by the cache.
This thread is a bit old but this KB is new and may help someone.
When there are moved issues another table needs to be changed, the moved_issue_key.
For those who are not SQL experts (like me) here is the proceedure I followed:
O.S.: Windows Server 2012 R2
SQL Server version: 220.127.116.11 (2012)
JIRA schema: "jiraschema"
IMPORTANT: As Nic told before, you must stop JIRA and perform a backup before peforming these changes
(i) It´s was translated by me, so some names can be different
update project set pcounter = 0 where pkey = 'PROJ'; commit;
Speccialy for who doesn't know so much about Linux commands and has an enviroment hosted on Linux machine:
1-First you have to stop jira service on Linux machine:
~$ sudo service jira stop
2-Confirm if the service is really inactive/stopped:
~$ service jira status
3-A line like this should be appear:
Active: inactive (dead) since...
4-Then, let's logon into mysql (here the user for mysql is 'root'):
mysql -u root -p
5-On command line should appear 'mysql>', where you'll type the following command, just attention that 'jiraservicedesk' is the name for the Jira Service Desk Database:
6-Finishing you'll type the procedure given by Sameera:
set pcounter = 0
where pkey = 'PROJ';
7-This message will appear on screen:
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
8-This last command is just to start jira service again:
~$ sudo service jira start
For Linux commands, these websites helped me so much:
Thanks Sameera and all!
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
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!
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