Add a 'sync issue' button to the view issue screen
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.
- 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)
- 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.