Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to set or seed the starting Issue number

George Carvill
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2012

I'm testing/evaluating the Bamboo / JIRA / GreenHopper combo. We have been testing Bamboo independently in production, so it contains records with pointers to JIRA Issues. But the JIRA production system does not -- and cannot right now -- get the Bamboo plugin.

I have a test instance of JIRA / GreenHopper. I can create a project with initials matching the ones Bamboo knows about. But the Issue numbers start at 1. To get a matching number I will have to pump in a thousand bogus JIRA Issues.

I was hoping there was a way to tell my new project to start with number 995, for example.

5 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2012

You can stop Jira, set the counter for the project and restart it. Uses SQL, and I really do mean it about stopping Jira, so that might not be suitable.

The other trick I use is exactly what you've suggested - import a CSV with the right number of lines, and then delete them all later. (Spreadsheets make it very easy to generate the CSV)

mahsa rafiee March 9, 2015

Hi, I want to assist the user by the next issue number (based on the current count of project issues), while he is creating an issue. this needs to create a custom filed or change the issue number field so that it sets the value based on the query result or project.issuecount +1; I greatly appreciate if you explain where and how I can write this query and test for a custom field. I am new to jira. based on the highest available issue number in the project I am trying to get the count of all issues of a project

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 9, 2015

You can't. You cannot know what the number is going to be until the user clicks the "save" button. Simple scenario - the counter is at say 576. So you start creating an issue. Your logic would say "the number will be 577". You don't type as fast as I do, and I click create before you. I get 577, and you get 578. Also, I'd question the requirement - what actual use is the number to the user before they create the issue? Second, for "trying to get a count of all issues", the issue keys are of no use. The instant someone moves or deletes an issue from the project, the "highest issue key" is wrong. To find out how many issues there are in a project, you need to run a filter for "all issues in project" and look at the number it returns.

mahsa rafiee March 18, 2015

Thank you for your reply. I just learnt how to check the answers (from a folder in my inbox)

1 vote
Nuwan
Contributor
April 24, 2015

go to your JIRA DB and navigate to the project table and there is a field called "pcounter" . set this field value to what you need . as your example if you want to tell your project to start with 995 then set this filed value to 994.

then you will get what you needed.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2015

Remember to STOP Jira before doing that, or you may find it does some odd things.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2015

Actually, that answer is exactly what I said already.

Nuwan
Contributor
April 24, 2015

Hi Nic you only mentioned is "You can stop Jira, set the counter for the project and restart it", when i see this i had no idea about the counter you mentioned in your answer.so thats why i put this answer.. thnks..

0 votes
admin February 27, 2025

The easiest way is to set up a CSV file with 2 simple lines to have the issue start at a number you want. 

Column A Row 1 = issue key Row 2 = your project key and the number you want (ABC-628)

Column B Row 1 = Summary Row 2 = Test (or something so you know it is not real)

Then follow these instructions 

https://confluence.atlassian.com/jirakb/how-to-change-the-issue-key-counter-to-a-desired-number-1251410572.html

Map "Issue Key" to "Issue Key"

Map "Summary" to "Summary"

Then import the file. 

0 votes
Santiago Villegas Giraldo June 22, 2015

Any solution available for Cloud versión? i don't have access to de DB

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 12, 2012

Use the data generator plugin in JIRA and pump in 994 issues. And later delete them.

https://marketplace.atlassian.com/plugins/com.atlassian.jira.plugins.jira-data-generator

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events