Answer by Support on 26 October 2023
Hello, Account Management , might I ask you to replace the getPreviousJson function with this
def getPreviousJson = {
def ttRepo = (syncHelper).twinTraceRepository
def await = { f -> scala.concurrent.Await$.MODULE$.result(f, scala.concurrent.duration.Duration.apply(1, java.util.concurrent.TimeUnit.MINUTES)) }
def orNull = { opt -> opt.isEmpty() ? null : opt.get() }
def ttOptFuture = ttRepo.getTwinTraceByLocalIssueKeyFuture(connection, issueKey)
def ttOpt = await(ttOptFuture)
def tt = orNull(ttOpt)
//com.exalate.api.domain.twintrace.ITwinTrace tt = orNull(ttOpt)
def lr = tt?.localReplica
!lr ? null : ({
def js = new groovy.json.JsonSlurper()
def previousPayload = js.parseText(lr.payload)
previousPayload.hubIssue
})()
}
Please, let me know how it goes