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

JSM has some SLA fields e.g. Time to resolution. The requirement here is to sync that field over to the Azure DevOps custom date field.


Send the field out from the Jira side:

Jira Outgoing Script
replica.customFields. "Time to resolution" = issue.customFields."Time to resolution"


Process the format in the replica to suit the Azure DevOps field:

Azure DevOps Incoming Script
def dateString = replica.customFields."Time to resolution".value.ongoingCycle.breachTime.jira.toString().tokenize('+')[0].split('\"')[1]
def datePattern = "yyyy-MM-dd HH:mm:ss"; 
DateFormat formatter = new SimpleDateFormat(datePattern);
dateString = dateString.replaceAll("T"," ").trim();
dateString = dateString.replaceAll("Z","").trim();
date = formatter.parse(dateString);
workItem.customFields."Date From Jira".value  = date      

Here is a short video demonstration of the script in action: