Hi,
I have written groovyscript in adapatavist to create jira issue. It created successfully when I use postman with basic authentication header. However when I try to call the same script via bitbucket webhook I do not know how to pass the authentication to groovyscripy and the jira is refused to create issue. Is there any work around on this?
Regards,
Leo
Hi @Leo Lu
Did you create a custom REST Endpoint using ScriptRunner for Jira or were you using Jira's REST API to create an issue?
For ScriptRunner's custom REST end point you have to remove the groups from your script to allow anonymous users to make a REST call.
Ravi
Hi,
It’s from Script Runner custom rest endpoint and already removed the group and it allows anonymous. But I am calling this custom rest endpoint from bitbucket webhook and even when I did the script below it still doesn’t allow me to create issue
def userManager = ComponentAccessor.getUserManager()
def createdasuser = userManager.getUserByName("user1")
then I pass this user to create issue but I got error saying I need to logged in to create issue
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.