Hi Team,
Recently I written a script to set field description as linked issues when selected issue from issue picker(Script runner issue picket field) but due to permission issue we are planning to change script runner picker field to JIRA insight field, but the same code not working for insight field.
Code:
Hi @Nagaraju
I have done a basic test in my environment, and I can get the description to display correctly.
Below is the sample Server-Side Behaviour code that I have used to test:-
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours behaviours
def sampleInsight = getFieldById(fieldChanged)
def sampleInsightValue = sampleInsight.value?.toString()
sampleInsight.description = ''
if (sampleInsightValue) {
sampleInsight.description = sampleInsightValue
}
Please note that the sample code provided is not 100% exact to your environment. Hence, you will need to make the required modifications
Below is a screenshot of the Behaviour configuration:-
Below are a couple of test screenshots for your reference:-
If you observe the screenshots below, the description for the Insight field is loading as expected.
Please note that I have tested this with the latest release of ScriptRunner, i.e. version 7.3.0. If you are using an older version, upgrading it to the latest release would be best.
I hope this helps to solve your question. :-)
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.