changing issue key for a specific issue type

Deleted user August 18, 2016

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 19, 2016

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.

Nani April 26, 2019

@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 ?  

 

Thanks,

Nani

0 votes
Błażej O_
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.
August 18, 2016

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 = &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 Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events