Forums

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

Is there a way to add leading zeros to the automatic generated issue number?

Roberto Raimondi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 21, 2020

The target is to see a new generated ticket like:

PRJ-0001 instead of PRJ-1

1 answer

0 votes
Jason Galea
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 21, 2020

Hi @Roberto Raimondi ,

There is not way on how to fix that on JIRA cloud. Although it would be possible if you are using JIRA Server

Roberto Raimondi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2020

Ciao Jason,

thank you for your answer.

So you suggest me to migrate from Cloud to a local Server?

Jason Galea
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 23, 2020

Depends how much you need this. Moving to server requires some maintenance from time to time. Server upgrades, add-on updates, etc....

I personally prefer server much more than cloud because you have full control on what you want to customize on JIRA. 

When it comes to costs, if you are more than 50 users, server would be the best choice. 

cheers,
jason

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 23, 2020

Er, implementing this on server is not a simple flag or setting (that Cloud doesn't use). 

It would need you to rewrite the code that generates the number used, either by changing the database to use a string for the issue number (and hence rewrite all the code that expects it to be a number) or by rewriting everything that uses the number such that it understands to convert between the 0-padded string and the number at every point.  You're going to need to hit code that handles displays, inout, searching, and indexing.

You would render your Jira installation instantly unsupported by Atlassian, you would have to re-do the analysis and re-coding on every upgrade, and some of the apps (including Atlassian's own internal ones) may well be broken by this as well.

Your best option here is to forget it and just educate your humans that Jira does not have leading zeros in its keys.  They're not much use in real life anyway.

Jason Galea
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 23, 2020

No need to mess around with project keys. There is a good add-on called “Automation for jira” i like to use. Just create a custom field and set up a counter with required padding for each issue created. That field can be added to notifications such as emails or chat channel alerts and can also be clickable my mapping it to the {{issue.key}}

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 23, 2020

Pointless though, as the field won't even be a link to the issue, won't be used for issue linking, won't appear in most places where you are interested in a key and won't be particularly searchable.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events