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 All,
We are trying to synchronize sprints from Jira to Azur Devops.
Below is the requirement:
Below are the things we tried:
But we had errors in Jira, not able to Synch Sprint data.
Added below outgoing Script in Jira:
def boardIds = ["1"] //Boards which sprints will get synced
if(entityType == "sprint" && boardIds.find{it == sprint.originBoardId}){
replica.name = sprint.name
replica.goal = sprint.goal
replica.state = sprint.state
replica.startDate = sprint.startDate
replica.endDate = sprint.endDate
replica.originBoardId = sprint.originBoardId
}
Added below Incoming Script in Azure devops:
if(entityType == "sprint"){
//Executed when receiving a sprint sync from the remote side
def sprintMap = ["1":"2"] //[remoteBoardId: localBoardId]
sprint.name = replica.name
sprint.goal = replica.goal
sprint.state = replica.state
sprint.startDate = replica.startDate
sprint.endDate = replica.endDate
def localBoardId = sprintMap[replica.originBoardId]
if(localBoardId == null){
throw new com.exalate.api.exception.IssueTrackerException("No board mapping for remote board id "+replica.originBoardId)
}
sprint.originBoardId = localBoardId //Set the board ID where the sprint will be created
}
Please let me know your valuable suggestions.
Thank you.
Hello, kalyan
documenting something for my future self, concerning your question:
JIRA OUT
ADO IN
Regards, Serhiy
Hi Serhiy,
Thank you.
I am facing below issue in Jira after adding above script from your reply.
Created below trigger in Jira:
Jira Out:
replica.key = issue.key
replica.type = issue.type
replica.assignee = issue.assignee
replica.reporter = issue.reporter
replica.summary = issue.summary
replica.description = issue.description
replica.labels = issue.labels
replica.comments = issue.comments
replica.resolution = issue.resolution
replica.status = issue.status
replica.parentId = issue.parentId
replica.priority = issue.priority
replica.attachments = issue.attachments
replica.project = issue.project
//Comment these lines out if you are interested in sending the full list of versions and components of the source project.
replica.project.versions = []
replica.project.components = []
replica.customFields."Sprint" = issue.customFields."Sprint"
/*
Custom Fields
replica.customFields."CF Name" = issue.customFields."CF Name"
*/
Below is the error:
Error Stack Trace
com.exalate.api.exception.script.ScriptException: No such property: issue for class: Script24 at com.exalate.error.services.ScriptExceptionCategoryService.categorizeProcessorAndIssueTrackerExceptionsIntoScriptExceptions(ScriptExceptionCategoryService.scala:40) at com.exalate.processor.ExalateProcessor.executeProcessor(ExalateProcessor.java:57) at com.exalate.replication.services.processor.CreateReplicaProcessor.$anonfun$executeScriptRules$2(CreateReplicaProcessor.scala:119) at scala.util.Try$.apply(Try.scala:213) at com.exalate.replication.services.processor.CreateReplicaProcessor.executeScriptRules(CreateReplicaProcessor.scala:117) at com.exalate.replication.services.processor.CreateReplicaProcessor.$anonfun$createHubReplica$2(CreateReplicaProcessor.scala:69) at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307) at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:56) at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:93) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85) at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:93) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:48) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: issue for class: Script24 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at com.exalate.processor.ExalateProcessor.execute(ExalateProcessor.java:98) at com.exalate.processor.ExalateProcessor.executeProcessor(ExalateProcessor.java:55) ... 19 more Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: issue for class: Script24 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) ... 22 more Caused by: groovy.lang.MissingPropertyException: No such property: issue for class: Script24 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309) at Script24.run(Script24.groovy:1) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) ... 23 more
Are we missing any thing?
Please let us know.
Hello, kalyan ,
Please, remove the sprint trigger and unexalate the sprint you'd attempted to sync - the sprint is going to be synced as part of the issue sync.
Syed Majid Hassan , I'm sure my explanation is cryptic, please help me.
Regards, Serhiy