How to set the starting issue number for a project

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When creating a new project, you want to define the number that starts the project's issue ID's. For example, you want to start your project from JIRA-1000 and not JIRA-1.

Resolution for Server, Data Center, and Cloud

You can do it yourself by using the External System Import with a CSV file, the file should be formatted like this:

key,summary
<PROJECT_KEY>-<START_INDEX>,<ISSUE_SUMMARY>

An example, if you want your project to start the issues from 1001:

key,summary
TEST-1000,Dummy summary

The dummy issue can be deleted afterwards. This will set the project issue number count to 1000, so the following issue will have the key TEST-1001.

Resolution for Server, and Data Center

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

The following process will help you modify that starting value

  1. Make backups of your database

  2. Shutdown Jira (Not applicable for Cloud)
  3. You should not change your counter value to anything lower than the newest created ticket value for your project, so run this query to find out what that value is:

    SELECT max(issuenum) 
    FROM jiraissue
    INNER JOIN project on project.id = jiraissue.project 
    WHERE project.pname = '<YOUR_PROJECT_NAME>';

    Make a note of this value.

  4. Set the pcounter value for your project to ONE LESS than your intended start (n-1). You CANNOT set your new starting number to anything lower than the value you got from the query in step 3.

    UPDATE project 
    SET pcounter = '<ONE_LESS_THAN_DESIRED_STARTING_VALUE>' 
    WHERE pname = '<YOUR_PROJECT_NAME>';
  5. Start Jira (Not applicable for Cloud)

Once Jira has started up the moment you create an issue in the project, it should assign to 1 number up from what you set.

Last modified on Mar 21, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.