How to sync Insight field?

Originally asked by Jillani Fazal on 28 July 2022 (original question)


Hi,

I have tried instructions on this https://docs.idalko.com/exalate/display/ED/How+to+sync+Insight+custom+fields#HowtosyncInsightcustomfields-SyncinganInsightcustomfield page to sync Insight custom field value to ticket what is created with Exalate.

  • Ticket is created to same project
  • Insight custom field is on create screen
  • Insight custom field “Application - All” should be synched as following text
    • “This tab details out what information has been synchronised from the remote issue Issue from: SDC using connection: SDI_to_SDC“ is shown and field is in there as shown in screenshot. But value isn’t in ticket custom field.

Looking forward to the input on it.


Answer by Juho Pekonen on 28 July 2022

Please review my script:

// SETTINGS
final def insightCustomFieldName = "Application - All"
 // END SETTINGS

issue.customFields[insightCustomFieldName].value = replica.customKeys."Application - All".collect {
 String vStr ->
  def cfm = com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager()
 def cf = cfm.getCustomFieldObject(issue.customFields[insightCustomFieldName].id)
 def cft = cf.getCustomFieldType()
 def v = cft.getSingularObjectFromString(vStr)
 v
}

Answer by Jillani Fazal on 28 July 2022

Hi Juho,

Please refer to these link and I hope you will find them useful:

Insight custom field values sync for two Jira Servers (old community)

How to map the values of insight custom field with values of radio button custom field? (old community)


Answer by Jillani Fazal on 28 July 2022

Hi Juho,

Would it be possible for you to share the incoming/outgoing script, please?