Confluence has been updated to version 6.15.9

Introduction

If you want to sync nFeed custom fields between JIRA instances and these fields are connected to the same database you should take into account that the new version of nFeed custom field(v5.13.0) does not accept an array of ids as a value.

Therefore, you need to convert ids to values. This article provides an example of the script which helps to sync the values of the nFeed custom field when each side uses different nFeed's versions.

Source side

Add this script to the Data Filter to send nFeed/element custom field's data

def ndFeedCFName = "nFeed custom field name"
def cfm = com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager()
def cf = cfm.getCustomFieldObject(issue.customFields[ndFeedCFName].id)
def cft = cf.getCustomFieldType()
replica.customKeys[ndFeedCFName] = cft.getStringFromSingularObject(issue.customFields[ndFeedCFName]?.value)


Destination side

 Incoming sync

Receive nFeed custom field's data 

// SYNC NFEED VALUES / ELEMENT CONNECT
({
    def syncNfeed = { String remoteCfName, String cfName->
		def cfm = com.atlassian	.jira.component.ComponentAccessor.getCustomFieldManager()
		def cf = cfm.getCustomFieldObject(issue.customFields[cfName].id)
		def cft = cf.getCustomFieldType()
		issue.customFields[cfName].value = cft.getSingularObjectFromString(replica.customKeys[remoteCfName])
    }
    syncNfeed("nFeed remote custom field name","nFeed1 local custom field name")
})()
// END: SYNC NFEED VALUES


See Also

How to sync nfeed fields when key values are different