Introduction
Assume you want to set up a connection between a software vendor and one of their customers. The challenge is to create a unified workflow so that each party can work on their own tracker, but that the issue is handled by both.
This example shows how you can set the right transition when syncing issue statuses.
Disjoint workflows
There are two issue trackers - blue and red.
Blue is being used by the customer, red by the software vendor. The blue workflow has been set up to reflect the remote issue status, while the red workflow is a simple three-stage issue workflow.
Blue | Red |
---|---|
The unified workflow main path is depicted below:
- Customer raises an issue and exalates it to the software vendor.
- A new issue is created automatically.
- The software vendor starts working on the issue.
- The customer issue is automatically progressed to status 'Remote progress'.
- The software vendor completes the implementation, and progresses the issue to 'Resolved'.
- The customer issue changes status automatically to 'Remote resolved'.
- The customer reviews the implementation and confirms by closing the issue.
- The software vendor issue is automatically closed.
Configuration
Blue issue tracker
Outgoing sync
replica.key = issue.key replica.assignee = issue.assignee replica.reporter = issue.reporter replica.summary = issue.summary replica.description = issue.description replica.comments = issue.comments replica.resolution = issue.resolution replica.status = issue.status replica.project = issue.project replica.priority = issue.priority replica.attachments = issue.attachments
Incoming sync
if (firstSync) { issue.project = nodeHelper.getProject("BUGSRUS") issue.issueType = nodeHelper.getIssueType("Task") } else { issue.summary = replica.summary issue.description = replica.description issue.comments += replica.addedComments issue.attachments += replica.addedAttachments if (replica.status.id == "3") { log.info("Transitioning using 'autoRemoteStart'") workflowHelper.transition( issue, "autoRemoteStart") } if (replica.status.id == "5") { log.info("Transitioning using 'autoRemoteResolve'") workflowHelper.transition( issue, "autoRemoteResolve") } }
Red issue tracker
Outgoing sync
replica.key = issue.key replica.assignee = issue.assignee replica.reporter = issue.reporter replica.summary = issue.summary replica.description = issue.description replica.comments = issue.comments replica.resolution = issue.resolution replica.status = issue.status replica.project = issue.project replica.attachments = issue.attachments
Incoming sync
issue.project = nodeHelper.getProject("ACME") issue.issueType =nodeHelper.getIssueType("Task") issue.summary = replica.summary issue.description = replica.description issue.comments += replica.addedComments issue.attachments += replica.addedAttachments // prepare the different customfield objects issue.customFields."Remote Reporter" = nodeHelper.getCustomField("Remote Reporter") issue.customFields."Remote Key" = nodeHelper.getCustomField("Remote Key") issue.customFields."Remote Assignee" = nodeHelper.getCustomField("Remote Assignee") issue.customFields."Remote Status" = nodeHelper.getCustomField("Remote Status") issue.customFields."Remote Reporter".value = replica.reporter.displayName + " (" + replica.reporter.email + ")" if (replica.assignee) { issue.customFields."Remote Assignee".value = replica.assignee.displayName + " (" + replica.assignee.email + ")" } issue.customFields."Remote Status".value = replica.status.name issue.customFields."Remote Key".value = replica.key // if the remote status is done, close the local if (replica.status.id == "10000") { workflowHelper.transition( issue, "autoClose") }
See also