Sync New Custom Field

Originally asked by David Rodriguez on 12 February 2020 (original question)


I would like to ask about the Custom Fields synchronisation, I am trying to sync a new field, but I am facing issues.

I added this sync rule: replica.customFields.“Partner Name” = issue.customFields."Partner Name”

Being "Partner Name” the field name. Also i tried with the ID of the field, but no results. (This is from JIRA Server to Cloud)

But it’s not working. Do you have any recommendation?

I’m following this guide:

https://docs.idalko.com/exalate/display/ED/How\+to\+Synchronize\+Custom\+Fields

Cheers.Source: Jira Cloud (old community)


Answer by André Leroy-Beaulieu Castro on 12 February 2020

Hi David,

The problem here is with that line you added you are only sending the custom field information, now you need to add logic in the Incoming Sync (destination side - Jira Cloud) to actually set that field into a custom field on that destination issue.

You have this:

Outgoing sync (source side - Jira Server):

replica.customFields."Partner Name" = issue.customFields."Partner Name”

You are missing this:

Incoming sync (destination side - Jira Cloud):

issue.customFields."Partner Name".value = replica.customFields."Partner Name"?.value

This is assuming that the field is also called “Partner Name” on the Cloud side and that the field if of type Text :smile:

Thanks,

André


Comments:

David Rodriguez commented on 12 February 2020

I tried this and update the ticket. But is not syncing the field. Probably some issue with the field name. So how can i test this but the field ID.

For example this is the ID of the field on the cloud: 10033 and this is the field’s ID on the server: 10403.

How can i apply it here:

issue.customFields."Partner Name".value = replica.customFields."Partner Name"?.value
André Leroy-Beaulieu Castro commented on 12 February 2020

Outgoing (Jira Server):

replica.customFields."Partner Name" = issue.customFields."10403"

Incoming (Jira Cloud):

issue.customFields."10033".value = replica.customFields."Partner Name"?.value

Let me know!

Thanks,

André

David Rodriguez commented on 12 February 2020

Nice! It’s working! Thanks André! (old community)

André Leroy-Beaulieu Castro commented on 12 February 2020

No problem!

Answer by David Rodriguez on 12 February 2020

One question about this, There are some old fields we want to sync since they weren’t created after the first synchronisation. How can i sync this fields?


Comments:

André Leroy-Beaulieu Castro commented on 12 February 2020

Hi David,

You can just add the logic to sync those fields to the sync rules of the connection and then if you update the tickets (change the summary, add a comment, for example), this will trigger a new sync and will sync those fields over.

Thanks,

André

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.