How to create a static issue ID field

tpham May 2, 2012

Hi,

I am looking for a solution for our organisation. We normally have to move issues around projects and it causes the issue keys change from time to time. I know you can still search for the issue using the old key. However, we also normally have to create reports for clients and the reports will just mess up because the keys are all different.

So my idea is to create a custom field which will become a static/unchanged issue ID (of course this field is for view screen only). One of my option is to get the ID from database itself, but how can you assign the ID to the issue? via workflow?

Can anyone please advise?

Thanks,

Tuan

1 answer

0 votes
NielsJ
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.
May 2, 2012

As you already sad, the ID could be a Custom Field that is not editable. You could write a service that searches for issues with the ID field empty and assign a unique ID (may be the original issue key, an integer number (bad to memorize) or a combination of project and date).

So you get unique IDs for all existing issues and for new issues as well (after a couple of minutes).

Nic Brough -Adaptavist-
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.
May 2, 2012

I've done this before, by writing a "derived" field. These don't create data in the database, but work out and display a string based on other stuff. They make it searchable and sortable if done right.

My code was actually a human specific one - it displayed the person who created the issue (not the reporter, long story, fix for another requirement) concatenated with the creation date, but it would be even easier to get and display the issue's database ID instead if you want an (ugly) unique and immutable reference to an issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events