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

This widget could not be displayed.

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.

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

150 views 16 7
Join discussion

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