I want to call the external systems(any other App) API from Jira ScriptRunner using a groovy script.
i ran the script but its throwing errors because of these libraries
import groovy.json.JsonOutput
import groovyx.net.http.ContentType
import groovyx.net.http.HttpResponseDecorator
import groovyx.net.http.RESTClient
Errors:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 4: unable to resolve class groovyx.net.http.RESTClient @ line 4, column 1. import groovyx.net.http.RESTClient ^ Script1.groovy: 2: unable to resolve class groovyx.net.http.ContentType @ line 2, column 1. import groovyx.net.http.ContentType ^ Script1.groovy: 3: unable to resolve class groovyx.net.http.HttpResponseDecorator @ line 3, column 1. import groovyx.net.http.HttpResponseDecorator
can any one help me on how to get this working is there any way we can upload libraries in script runner which are popping this errors.
Thank you.
Hello @Shirley He
Yes, you can achieved it with Scriptrunner Behaviors.
Add-ons -> Behaviours
Add behavior, add mapping to your project and issue types.
Fields -> Add field2(field that will be trigger clearing)
add server-side script:
def field1 = getFieldByName("field to clear name")
def field2 = getFieldById(getFieldChanged())
field1.setFormValue(null)
Hello Markov,
I have used the code snippet to achieve one of my requirements similar to this. but Whenever I open edit screen to edit the value of the field its not showing the currently selected values
Example I have 2 fields Country and Region, and both are multiselect fields. Currently
field Region is having 3 values A,B,C. and when i open the edit screen it won't show these selected values it will just allow us to select new values after using the code snippet
Please provide me any solution if you have
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.