I'm at my wits end. I've been fighting this all morning and can't figure it out. I'm getting the following error. For what it's worth, it works like a charm in the script console!
2019-08-30 16:09:07.529 ERROR - java.net.URISyntaxException: Illegal character in path at index 90: https://avst.connect.adaptavist.com/proxy-service/rest/api/1/jira/proxy/rest/api/2/issue/${issue.key} 2019-08-30 16:09:07.531 ERROR - Class: com.adaptavist.sr.cloud.workflow.RunScript, Config: [className:com.adaptavist.sr.cloud.workflow.RunScript, uuid:c8514b86-b940-4843-97bd-b79eebd340b8, description:devChange calculation, enabled:true, executionUser:ADD_ON, additionalCode:// get custom fields
My script fires on a workflow transition:
def customFieldName = 'customfield_13635'
def result = get("/rest/api/2/issue/${issue.key}?fields=${customFieldName}")
.header('Content-Type', 'application/json')
.asObject(Map)
def currentValue = result.body.fields[customFieldName] as Integer
def newValue = currentValue + 1
def newResult = put("/rest/api/2/issue/${issue.key}")
.queryString("overrideScreenSecurity", Boolean.TRUE)
.header('Content-Type', 'application/json')
.body([
fields:[
customfield_13635: newValue
]
])
.asString()
Hi,
I am getting the same error of the first message. Any additional info about how to solve it?
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mary,
Thank you for confirming that you managed to resolve your issue.
Could I please ask you to share here the details of what you did to resolve the error, so that other users with the same error can see how to resolve it.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did anyone figure this out?
I’m getting the same error on my post function custom script but it works in the script console:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Disregard on my previous posting. I was able to solve this by removing the + issue part in my end point for the result variable and use the standard ${issue.key} variable to update the current ticket in question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.