Note
We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again
The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
Hi Team,
We are using Exalate connect option to sync existing Jira issue with existing github issues/PR's.
When we sync with Github we have below script placed in Jira incoming script.
issue.customFields."GITHUB ID".value = replica.key
issue.customFields."GitHub Status".value = replica.status.name
issue.customFields."Github link".value = remoteReplica.payload.issueUrl
These above field values not syncing immediately after the first sync.
--------------------------------------------------------
Jira incoming script
--------------------------------------------------------
if(firstSync){
syncHelper.syncBackAfterProcessing()
}
issue.projectKey = "SWDEV"
// Set type name from source issue, if not found set a default
//issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Defect"
//}
//issue.summary = replica.summary
//issue.description = replica.description
issue.customFields."GITHUB ID".value = replica.key
issue.customFields."GitHub Status".value = replica.status.name
issue.customFields."Github link".value = remoteReplica.payload.issueUrl
------------------------------------------------------------------------------------------------
Github Incoming script
------------------------------------------------------------------------------------------------
if(firstSync){
issue.repository = "amd-trial/DemoEx"
}
issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
/*
Status Synchronization
Sync status according to the mapping [remote issue status: local issue status]
If statuses are the same on both sides don"t include them in the mapping
def statusMapping = ["Open":"New", "To Do":"Open"]
def remoteStatusName = replica.status.name
issue.setStatus(statusMapping[remoteStatusName] ?: remoteStatusName)
*/
issue.labels = replica.labels
issue.assignee = nodeHelper.getUserByUsername(replica.assignee?.username)
issue.reporter = nodeHelper.getUserByUsername(replica.reporter?.username)
---------------------------------------------------------------------------------------------------
Please help with your inputs on this