So Components have IDs, but those IDs are not globally unique (by “globally” I mean across any number of Jira Cloud accounts). I know that from a user’s point of view, Components are specific to Projects, but in a quick test I just ran, I noticed generating new components across different Projects always gives them a unique Component ID for a given Resource ID. For example:
My Jira Account (Resource)
Project A: Component “Foo” gets id 10001
Project A: Component “Bar” gets id 10002
Project B: Component “Foo” gets id 10003
Project B: Component “Baz” gets id 10004
Can I rely on the combination of Component ID and Resource ID to be unique across all Jira Accounts?
My use case is storing Jira data for multiple clients in a single SQL database for analysis. I’m adding components, and it will be slightly simpler to just use Component ID + Resource ID as the index, rather than Component ID + Project ID + Resource ID.
Like many other resource IDs, component IDs are unique within the Jira instance. Regardless of which project they are created in, component IDs are numerical increments starting at 10000.
If you wish to uniquely identify components from different Jira instances, you will need to also keep track of the base URL of the instance in your dataset.
And I’ve been using the Resource ID to uniquely identify different Jira instances. I believe we get Resource IDs as the end result of the auth flow that our clients have to go through to allow us to see their Jira accounts’ data. So, for example, our existing JiraIssue table uses the Issue ID and the Resource ID as its unique identifier.