How to get a globally unique ID for an issue

Hi,

Does issues have a unique ID, or how could I globally identify an issue? I’m working on a Jira Custom UI app, it may be used in different projects by different teams. I can get the context on the current issue with resolver or getContext from custom UI bridge, like this.

{
  localId: '...',
  cloudId: '6cee61c7-1526-4615-8e01-a5ce2a1dc531',
  moduleKey: '...',
  extension: {
    issue: { key: 'test-1', id: '10000', type: 'Task', typeId: '10001' },
    project: { id: '10000', key: 'TEST', type: 'software' },
    isNewToIssue: false,
    type: 'jira:issuePanel'
  },  
  installContext: '...',
  accountId: '...'
}

But to our app, it needs a globally unique ID for each issue, and it should be permanent.

Will cloudId + project id + issue id be a solution? I’m not sure what exactly cloudId is, is it permanent or may change later? Will it be the same for all the users working on the project?

Thanks in advance!

Hi @Ming ,
Thanks for reaching out :slight_smile:
Just to be sure - by saying ‘globally unique ID’ you are referring to Id that is unique for one Jira or for all Jira?
Because if you are looking for GUID for one Jira then issue_id is enough.

Regards
Magdalena

1 Like

Thanks for your quick response. It’s all Jira. Imagine a multi-tenant scenario, company A and company B may both have an issue with id 10000 I guess. To our app we want to build, we need a way to tell which issue is from company A, and which belongs to company B, then in the issue panel, it can show some custom data correspondingly.

This is why we need to get or generate an ID that is unique to all Jira, or a method to tell in which Jira our app is running, this will work too. Can we use one, or maybe two attributes in the context for this purpose?

By the way, I think a user can have two or more Jira instances. If so, will the accountId from the context be the same for all the instances?

Thanks

@MagdalenaRogulska Hi, please see my post above, is it possible to identify an issue cross Jiras? Any advice is appreciated. Thanks!

Hi @Ming ,
Right now we have one Jira for one Tenant which means cloud_id gives you unique id for Jira. You just need to combine it with issue_id and it will give you GUID for issue - which you were looking for.

Regards
Magdalena

2 Likes

@MagdalenaRogulska Thanks a lot!

I have similar use case, but I have customer on cloud and customer using on-prem jira software. What is the equivalent of cloud_id for on-prem, can I use hostname/domain ?