Introduction

This article describes how to synchronize GitHub issue statuses, based on the remote issue status.

GitHub issues can have Open or Closed status. You can set the status of the synced issue, based on the status of the remote issue.

Configuration

Let's consider you already have the Connection configured between GitHub and Jira Instances, using the simple project template

This connection includes basic Sync Rules, which allows you to sync issue fields such as 

  • Summary
  • Description
  • Comments
  • Labels

Now you need to adapt the Sync Rules, such that the status of the local issue is changed, based on the remote issue status. 


Outgoing sync(data filter)

This code is included in the default Sync Rules. You don't need to add it to the Data Filter.

replica.status = issue.status


Incoming sync for existing issues(change processor)

//If the jira status is Done, set the GitHub issue status to Closed
if(replica.status.name == "Done"){
 replica.status.name = "Closed"
 issue.status = replica.status
}else{
 replica.status.name = "Open"
 issue.status = replica.status
}