Resetting a JIRA Project’s Ticket Counter

Here are a few simple steps to resetting the ticket counter in a JIRA project.

1. Stop the JIRA instance from running by executing the shutdown.sh script found in $JIRA_HOME/bin

2. Log into the local mysql instance that is running and change the working database to ‘jira’

3. Execute the command:

select * from project where pkey=’PROJECTKEY’

…For example if your Project Key is ‘HELPDESK’ then you would execute the command:

select * from project where pkey=’HELPDESK’

…The output of this command gives you the the project ID as it’s stored in the database.

4. Now using the project ID we obtained in the previous step, execute the following command:

update project set pcounter=0 where id=’PROJECTID’

…Replace PROJECTID witht he number we obtained in the previous step. Obtaining the project ID is just for re-assurance that we are resetting the counter for the correct project. You could always skip this step and in step 3 execute the following command:

update project set pcounter=0 where pkey=’PROJECTKEY’

…and obtain the desired result.

5. Now that the counter has been reset to zero, start the JIRA instance once again by executing the startup.sh script found in $JIRA_HOME/bin

…Viola! It’s that simple!