How to have keys match between jira cloud instances

Originally asked by Chris Matthews on 07 February 2024 (original question)


I have two Jira cloud instances with exalate. One instance is a source instance and the second instance is a target instance. New tickets will only be created in the source instance. I need to setup a sync where the tickets, including keys, match on the source and target instance. I understand that Jira cloud has a limitation where the ticket key is auto generated.

My plan was to auto generate generic placeholder tickets in the target instance. As tickets are created in the source, they lookup the existing key and make updates to the corresponding ticket and create an exalate link. What would the scripts look like on the inbound and outbound sides of the sync?


Answer by Mike Fowler on 01 April 2024

Is the requirement for both Jira Keys to match a hard and fast one?

If not, an alternative could be to have a custom field that stores the Key Value from the source instance on the destination instance?

You could then run any reporting / dashboards etc off this custom field.


Answer by Syed Majid Hassan on 12 February 2024

Ahh so you are aware of the limitation already, so yes, that is a bit of a problem. Even though it is possible to do this, but its quite risky in that if one ticket is deleted or created extra, it destroys the whole scheme. There is a detailed article on the subject here: https://docs.exalate.com/docs/is-it-possible-to-keep-the-issue-key-same-on-both-sides

Hope it helps.

Thanks

Majid


Comments:

Chris Matthews commented on 13 February 2024

Thanks, are there any scripting samples for the precreation approach? Ideally Im looking for the exalate connection to be done automatically as new tickets are created in the source system

Syed Majid Hassan commented on 24 February 2024

The precreation of issues will not happen via Exalate, but rather via a bulk action in Jira itself.

Then you can use the “Connect” feature in exalate to link the two up.