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.
@Nic Brough _Adaptavist_ I am also looking for the Issue key for the Issue types, Is there any way?
Can you elaborate this point how to do this "Can you create a field with the extra ID in it - a scripted field could easily construct such a key for every issue" ?
You mean, I need to create a field under Issue types right? but how come it is unique from other issues in same issue type ?
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 an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events