How do you create a read-only custom feild that generates a unique ID whenever an issue is created (Jira Cloud)

Paul Silva February 16, 2016

Can anyone provide me with a quick solution? I really need a unique issue ID other than the one generated per project on Jira.

2 answers

0 votes
raja shekar December 21, 2016

Do we have a solution for this issue in JIRA Cloud yet??

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.
December 22, 2016

I'd use Script Runner for JIRA Cloud to write a post-function for the create transition that takes the issue id from the database and copies it out to a custom text field that is only put on "issue view" screens.

I certainly wouldn't try to generate your own sequence either - the issue id in the database is the only safe reliable way to do this without masses of complex code.

I'm still not sure it's of any real use when the issue key is what the humans use and has all the functionality.

 

0 votes
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.
February 16, 2016

What's wrong with the JIRA issue ID? 

Not that it matters - you'll need code to do it, which you can't really do on Cloud.  A Connect add on might be able to provide something to stick on an issue, but it won't be ideal (i.e. not quite a field).  Even if you did do this, you'd want to generate something based on the, well, JIRA issue ID, otherwise you can't guarantee uniqueness.

Paul Silva February 16, 2016

Having an issue ID tied to a project is fine. I need a supplemental issue ID that will be static from the moment it is created such that if the issue is moved to a different project that issue ID is not changed. Our company uses these IDs for reference documents that may be released to customers and we definitely do not want project IDs included in that document. Furthermore, we definitely do not want to manually create the issue IDs by hand or map them ourselves. JIRA should have a way to create a project independent issue ID.

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.
February 16, 2016

For this case, I'd simply try to expose the issue ID in the database, rather than the issue Key.  The id of an issue doesn't change when you move it.  But again, I'm not sure you can usefully expose that in the UI on Cloud.

But you could still use the JIRA Key, even though it can change when an issue moves projects, JIRA remembers that.  If you have ABC-123 and move it to DEF-456, then you go visit https://yourjira/browse/ABC-123, it will take you to DEF-456.

(One other random thought is also "turn off the right to move issues", but that feels inflexible)

Paul Silva February 17, 2016

Thanks - that bit of information might be enough for us! It would be good if that unique key (independent of project) was exposed to cloud users somehow.

Suggest an answer

Log in or Sign up to answer