Hello,
We are trying to set the summary field with the name of a selected Insight object.
Can anybody help us?
Thank you
Anna
import com.atlassian.jira.component.ComponentAccessor
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.channel.external.api.facade.IQLFacade
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
@WithPlugin("com.riadalabs.jira.plugins.insight")
@PluginModule IQLFacade iqlFacade
// if (getActionName() != "Create Issue") {
// return // not the initial action, so don't set default values
//}
// set Summary
def AffectedItemField = getFieldByName("Affected Item")
def AffectedItem = AffectedItemField.getFormValue()
def summary = getFieldById("summary")
def AffectedItemName = iqlFacade.findObjectsByIQLAndSchema(10, "key = ITSM-36608")
summary.setFormValue(AffectedItemName.Name)
I assume this is ScriptRunner? Is it a "behaviour"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.