How to create a static issue ID field

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

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).

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
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

22,032 views 2 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