Sprint Name in Custom Field

Originally asked by Harold Oconitrillo on 09 October 2023 (original question)


The situation is that we want to synchronize the sprint name value of a ticket on the remote system to a custom field, just showing the name in our local system.

We were able to send the information to the local system, but we can not get the value into the custom field on the incoming side.

I tried to write the name into the custom field with the following code:

// Prüfen, ob das hubIssue-Objekt und das sprint-Array vorhanden sind

if (replica.hubIssue && replica.hubIssue.sprint) {

    // Überprüfen Sie, ob das sprint-Array nicht leer ist

    if (replica.hubIssue.sprint.size() > 0) {

        // Den Wert des "name"-Feldes im benutzerdefinierten Feld "Sirconic Sprint" speichern

        def sprintName = replica.hubIssue.sprint[0].name

        issue.customFields."Sirconic Sprint".value = sprintName

        

        log.info("Sprint-Name wurde im benutzerdefinierten Feld 'Sirconic Sprint' gespeichert: " + sprintName)

    } else {

        log.warn("Sprint-Array ist leer.")

    }

} else {

    log.warn("hubIssue-Objekt oder sprint-Array nicht gefunden.")

}

Answer by yasemin on 11 December 2023

I think it would be beneficial to share the outgoing sync script as well. This way, we can quickly identify and rectify any errors. We also have a documented example that could be useful in this context.

https://docs.exalate.com/docs/how-to-sync-sprints
Let me know if this helps.