Unable to synchronize custom field Version Picker (single version) type

Originally asked by Harold Oconitrillo on 21 October 2022 (original question)


Hi all,

I’m using Exalate between a Jira cloud instance and a Jira datacenter, my customer trying to sync a custom field Version Picker (single version) type.

the customer rows are:

def project = nodeHelper.getProject(issue.projectKey)
issue.fixVersions = replica.customFields
."Fix planned in Release".value
// ensure that all the fixVersions are available on B
.collect { v -> nodeHelper.getVersion(v.name, project) }
.findAll{it != null}

my script rows are:

def project = nodeHelper.getProject(issue.projectKey)
issue.customFields."Fix target in Release".value = replica.customFields
."Request Fix Version".value
.collect { v -> nodeHelper.getVersion(v.name, project) }
.findAll{it != null}

could you prived to us an information why the first Code bracket works and the second one doesn’t? From our POV these two Lines should work identical
Just as a note the Customfields on both Sides are Version Pickers with the same Version Nameing on both sides.

thanks in advance


Comments:

Serhiy Onyshchenko commented on 21 October 2022

Hey, Harold Oconitrillo , what happens if you print the

debug.error("versions="+replica.customFields
."Request Fix Version".value.collect {it.name})

?

Francesco Doricchi commented on 24 October 2022

Hi Serhiy Onyshchenko,

where I have to put this code? my incoming script? (datacenter) or in thre incoming script of remote? (cloud)

thanks in advance

BR

Harold Oconitrillo commented on 25 October 2022

Hi Francesco,

You are right, this is in the Jira Cloud incoming script.

Feel free to let us know the output.

Best regards.

Answer by Francesco Doricchi on 14 November 2022

Hi Serhiy Onyshchenko,

have you any news about my problem?

Thanks

BR

Francesco Doricchi


Answer by Francesco Doricchi on 27 October 2022

Hi Harold,

with this code I have this error. My side is Jira datacenter, and the field comes from a cloud instance. Is it ok or I need a different script?

thanks in advance

BR