What is scriptrunner equivalent to sys.exit() to exit script if condition is met. Sample code flow to handle only if the ticket is related to vendor:def a = issue.fields["customField_10111"] if(a != "Vendor") { sys.exit() //import sys is not available. }if( issue_fields["customField_10112"] == "Configuration") { def result = put("/rest/api/2/issue/${issueKey}").header('Content-Type', 'application/json') .body ([ fields: [ customField_10113: "Require Vendor Agreement" ] ]).asString()
def email = post("https://somewebhook.com/webhook1/" + ${issueKey)).asString()}if( something ) { do something}
Hey @Nor Hisham Nordin
Since it's Groovy you should be able to "exit" the code simply by using a "return" statement.
Thank you very muchhh
It looks like you're new here. Sign in or register to get started.