Hi all,
this week end, we proceed to some jira upgrade (V 9.12.2). so from this time a major Behaviours script is no longer working.
After some search, it seems the Insight (now Assets) custom fields are not populated correctly
I rework the initial script, and test Asset creation (works fine), but the setFormField never display the value needed
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade
import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectTypeAttributeFacade
import com.riadalabs.jira.plugins.insight.services.model.ObjectBean
import groovy.transform.BaseScript
@WithPlugin('com.riadalabs.jira.plugins.insight')
@BaseScript FieldBehaviours fieldBehaviours
@PluginModule ObjectFacade objectFacade
@PluginModule ObjectTypeAttributeFacade objectTypeAttributeFacade
def FTestValue = getFieldById("customfield_xxxxx")
def FInsightCf = getFieldById("customfield_yyyyy")
def cfvalue = Assets.getById(aaaaa)
log.warn("testvalue is:" + cfvalue.getLabel())
FTestValue.setFormValue(cfvalue.getObjectKey())
FInsightCf.setFormValue(cfvalue)
at this point, the FtestValue (simple text customfield) show correctly the Asset Key of seelcted object
but the FInsightCf.setFormValue(cfvalue) didin't set the custom field
I tried in several ways such as setFormValue(["TheKey"]) setFormValue("TheKey") setFormValue(TheId), setFormValue(Assets.getByKey('AAA-1').. . but nothing happened.
checking this page https://docs.adaptavist.com/sr4js/latest/hapi/work-with-assets-insight but found nothing interesting in my case
Thank you