changing issue key for a specific issue type

Hello Everyone

Is it possible to have separate issue key format for specific issue type? 

Following is the scenario

Project is Wifi Project and key is WIFI

I have two issues types : Story and Sub-task

I want the issue key for story as STR-WIFI-200 where as the issue key for subtask should have the default format like WIFI-201


Is this possible using any custom code? If yes can you list few of the options if you have tried this anytime?


Many thanks!

2 answers

1 vote

You would need to rewrite most of JIRA Core and all the applications and add-ons to support that.  As Blazej has pointed out, it's not really stored, but there's huge swathes of code that assume that an issue key is always <project>-<seq> and wouldn't cope with other changes.

If you insist on trying to have a format like that, the best you can do is create a field with the extra ID in it - a scripted field could easily construct such a key for every issue, but it won't work the same way as the JIRA identifier.

Looking at the database level I don't think that this is possible. Issue key is nowhere written explicitly. I think that back in the days of JIRA 4 there was a column in the database that held issue key explicitly, but now issue key is a pure combination of project key and consecutive number of the issue in the project.


If you want to read the issue key from the database you have to look it up like this:

select p.pkey+'-'+ji.issuenum as issueKey
from jiraissue ji
join project p on ji.project =
where = &lt;&lt;yourIssueID&gt;&gt;


As you can see issue key is constructed of project key. You can not have many different project keys for one project, therefore there seems to be no way to have the issue key to also vary inside the project.

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published Tuesday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

428 views 6 16
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot