How To Sync Time Tracking from Azure DevOps to Jira?

Originally asked by Harinder Singh on 23 July 2020 (original question)


I want to sync time tracking progress from Azure devops to Jira, please help how to do thank you.


Answer by Ariel Aguilar on 14 July 2021

Thanks for raising this question!

You can include the following three fields in the Outgoing sync of the Jira to add them to the replica:

replica.originalEstimate = issue.originalEstimate
replica.spent = issue.spent
replica.estimate = issue.estimate

Then to sync those values into the Original Estimate, Remaining, and Completed fields in Azure you need to add the following logic into your Incoming sync in Azure DevOps:

//Time Tracking
if(replica.originalEstimate) {
    workItem."Microsoft.VSTS.Scheduling.OriginalEstimate" = (replica.originalEstimate as Double)/3600
}
if(replica.estimate) {
    workItem."Microsoft.VSTS.Scheduling.RemainingWork" = (replica.estimate as Double)/3600
}
if(replica.spent) {
    workItem."Microsoft.VSTS.Scheduling.CompletedWork" = (replica.spent as Double)/3600
}

Kind regards,

Ariel