×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Add a 'sync issue' button to the view issue screen

Francesco Abbundo

Francesco Abbundo Last update: Mar 8, 2019

If you do not want issues in a project to be synchronized by default – but only after a user has manually authorized the synchronization – then you can add a 'sync issue' button to the issue screen, letting you authorize synchronization on an issue-by-issue basis.

The method behind this is simple. First, we'll configure Backbone to only synchronize issues with a certain label, then we'll create a workflow transition button which will assign the issue that label when clicked.

1. Set only issues with a certain label to be synced

First, we'll limit the synchronized issues, so that only issues with the label 'sync' are synchronized (you can use any requirement, this is just an example).

To do this, navigate to the 'issue types' tab on the synchronization configuration, then click 'limit issues'. For your scenario, this JQL should work:

Now, only issues with the label 'sync' will be synchronized to the partner instance.

2. Edit the project workflow

Now, we need to edit the project workflow, to add a workflow transition which will automatically assign the label 'sync' when triggered.

  1. Edit the workflow for the project (and, if needed, issue type) you want to add the button to, and add a global looped transition (from any status to itself)
  2. Assign a POST function to this transition which modifies the issue so that it qualifies for the sync. In our example, this POST needs to add a label named 'sync'. You need to use an add-on such as Scriptrunner to set labels with a POST function.

Now, your sync button will appear when you view issues and you can click it to trigger the issue to be synced.

2x3.9
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok