Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

We have a few questions regarding synchronization of issues in different Jira instances via REST API

Thorsten Göttler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2019

Dear JIRA support,

we do have several questions related to synchronizing two JIRA
instances:

- Is it possible to synchronize a pair of issues located on two separate
instances directly via the REST API instead of e.g. downloading the
issue data from both instances and implementing the synchronization
oneself?

- In case there is no ready-to-use solution:
- Is it possible via the REST API to merge two issues' comments in
chronological order and update (i.e. replace) the respective issues'
comments with the merge result?
- Is it possible to lock an issue for exclusive access by one user?
- Is it possible to lock an issue for modifications in general or for
non-API modifications without adding an additional status and
related transitions?
- Is it possible to do transactional updates to e.g. issue summary,
description and comments via the REST API?

We are running JIRA version 7.6.9 (might be able to update) and would
like to synchronize to a second 7.6.9 instance (where an update request
is unlikely to be fulfilled).

Regards

Thorsten Göttler

2 answers

2 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2019

Yes, you can, but

It will not be exact - the REST APIs do not allow you to synchronise everything

I would strongly recommend a look at Exalate and Backbone (and search the marketplace for other "synchronisation" tools)

Comment content can be partially or fully synchronised, but it's not a "merge".  You may see differences in users and dates as well

Yes, if you use Jira permissions and probably workflow stuff.  But locking an issue on one side may make synchronisation fail.

No, it's not transactional

Thorsten Göttler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2019

Hello,

Thanks for the reply, but the answer did not solve all our questions.

Most importantly we are interested in the synchronization of comments in chronological order. Let me make an example:

- A Comment is added in Jira1

- A Comment is added in Jira2

- No we want to synchronize -> if we just create the comments on the other side, they will be in reverse order respectively

Therefore we ask, if there is a way to synchronize them on both sides, so that the order is the same on both sides

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2019

No, you will need to write your own apps that will

  • include the exact date/time a comment is made in the synchronisation payload data
  • Know to use that data to override the actual dates on comments
1 vote
francis
Atlassian Partner
June 28, 2019

(Nic, thanks for mentioning Exalate)

Hi @Thorsten Göttler

 

(I'm part of the Exalate team).  I was triggered by the questions you have been asking

 

- Is it possible to synchronize a pair of issues located on two separate
instances directly via the REST API instead of e.g. downloading the
issue data from both instances and implementing the synchronization
oneself?

Yes - there is.  There are different architectures possible, but interfacing with Jira for synchronising can be done 

- In case there is no ready-to-use solution:

As Nic stated - there are a couple of solutions listed here.  We enjoy building Exalate, which is an issue synchronisation solution allowing to connect Jira to Jira, Github, ServiceNow, HP ALM/QC, Zendesk and more to come.  There is no limit of synchronisation cases that you can implement with the embedded scripting engine (</end pitch>)


- Is it possible via the REST API to merge two issues' comments in
chronological order and update (i.e. replace) the respective issues'
comments with the merge result?

Yes - that is possible. For the users and dates, you can enrich the comment body with the original creation date and details of the user, such that that key information is available for the reader.


- Is it possible to lock an issue for exclusive access by one user?

I was a bit curious, and I changed the permission scheme in a project such that only the current assignee can edit the issue.

Check the video here where the assignee is changed
https://youtu.be/A44FnAuit2U

For the synchronisation itself, you need to ensure that the proxy user has the right permissions.  This can be part of the setup of the permission scheme.

 


- Is it possible to lock an issue for modifications in general or for
non-API modifications without adding an additional status and
related transitions?

Check the previous comment. 


- Is it possible to do transactional updates to e.g. issue summary,
description and comments via the REST API?

yes

https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/

Look up: Updating multiple fields in one request

 

We are running JIRA version 7.6.9 (might be able to update) and would
like to synchronize to a second 7.6.9 instance (where an update request
is unlikely to be fulfilled).

 

 

You might revisit your intent to DIY :-)

Suggest an answer

Log in or Sign up to answer