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?
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 = p.id where ji.id = <<yourIssueID>>
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.
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot