We have a list of Components mapped with SubDelivey (Custom Field). While creating a ticket if User Select Both Fields then no changes are required, but when the user selects the only component and does not select SubDelivery. then the script should work based on Components, and SubDelivery Should update.
I am using your exact code, just with the url and the channel changed.
Getting these errors
There was an error during the execution of your script
groovy.lang.MissingMethodException: No signature of method: groovyx.net.http.HTTPBuilder.request() is applicable for argument types: (groovyx.net.http.Method, groovyx.net.http.ContentType, script15283798434881196727310$_run_closure1) values: [POST, text/plain, script15283798434881196727310$_run_closure1@2b2f527c] Possible solutions: request(groovyx.net.http.Method, groovy.lang.Closure), request(groovyx.net.http.Method, java.lang.Object, groovy.lang.Closure), request(java.lang.Object, groovyx.net.http.Method, java.lang.Object, groovy.lang.Closure)
Hello Sergio,
Bellow is an example of a script that makes use of the HttpBuilder and posts a message to Slack.
import groovy.json.JsonBuilder
import groovyx.net.http.ContentType
import groovyx.net.http.HTTPBuilder
import groovyx.net.http.Method
def http = new HTTPBuilder("https://hooks.slack.com")
http.request(Method.POST, ContentType.TEXT) {
uri.path = "/services/XXXX/YYYYY/ZZZZZ" // <1>
body = new JsonBuilder([
channel : "#dev",
username : "webhookbot",
text : "Hello World !",
icon_emoji: ":ghost:",
mrkdwn : true,
]).toString()
}
Hope that helps.
Regards, Thanos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using your exact code, just with the url and the channel changed.
Getting these errors
There was an error during the execution of your script
groovy.lang.MissingMethodException: No signature of method: groovyx.net.http.HTTPBuilder.request() is applicable for argument types: (groovyx.net.http.Method, groovyx.net.http.ContentType, script15283798434881196727310$_run_closure1) values: [POST, text/plain, script15283798434881196727310$_run_closure1@2b2f527c] Possible solutions: request(groovyx.net.http.Method, groovy.lang.Closure), request(groovyx.net.http.Method, java.lang.Object, groovy.lang.Closure), request(java.lang.Object, groovyx.net.http.Method, java.lang.Object, groovy.lang.Closure)
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.