Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner console - How to use groovy-wslite

Christof Hurst _kreuzwerker_
July 29, 2020

Hi,

I want to implement a Webservice Client at one customer but I'm not able to use the @Grab command. At other customers it works but not for the special on. 

My sample code is

@Grab('com.github.groovy-wslite:groovy-wslite:1.1.2')
import wslite.soap.*

def client = new SOAPClient('http://www.thomas-bayer.com/axis2/services/BLZService?wsdl')
def response = client.send(SOAPAction:'http://www.thomas-bayer.com/axis2/services/BLZService') {
  body {
    getBank(xmlns:'http://thomas-bayer.com/blz/') {
      mkp.yieldUnescaped "<blz>66050101</blz>"
      }
  }
}
// result will be "Karlsruhe, Baden"
return response.getBankResponse.details.ort

The error is

The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: General error during conversion: Error grabbing grapes -- /home/jira/.groovy/grapes/resolved-caller-all-caller-working33.xml (No such file or directory)

I found some documentation but I can manage it to work.

I also tried a custom plugin with resolved dependency in POM but I have no knowledge how to configure the plugin modules correctly and how to fetch with @WithPlugin and @PluginComponent 

Can anybody help?

Berst regards

Christof

2 answers

Suggest an answer

Log in or Sign up to answer
1 vote
John Chin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 9, 2021

Hi @Phil Evans ,

Unfortunately is not possible at the moment according to Jamie comment.

One workaround would be using IQL function on the Insight custom field configuration.

For example:

Screenshot 2021-04-09 at 3.42.23 PM.png

To filter based on project or groups in the IQL, you can refer some example here.

0 votes
Hakan Bahadir
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2021

Hello,

It is possible to filter the values of Insight Custom Fields using the Filter Issue Scope configuration. Please find the examples here. You also can use the field values of the JSM portal with ${issuetype} place holder in your IQL statement. Here is the full list of placeholders you can use in custom fields, post functions, automation rules, and imports.

Cheers,

Hakan Bahadir

Solutions Engineer

Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 5, 2022

@Hakan Bahadirdo you know the placeholder for request type? I am able to filter based on issuetype with ${issuetype.label}, but I have many request types using the same issue type and I need to use the request type, not the issue type, to filter.

TAGS
AUG Leaders

Atlassian Community Events