Hello
I want to increase the time spend on an issue when the issue is changing its status. For that purpose, I'm using script runner post function with following script:
def issueKey = issue.id
def result = put("/rest/api/3/issue/${issueKey}/worklog")
.header('Content-Type', 'application/json')
.body([
timeSpent: '2h'
]).asString()
But always as a result I'm getting "status: 405 - Method Not Allowed".
It happens no matter whether I run it as a ScriptRunner Add-On User or Initiating User.
I've tried similar, external python script with the same user and it worked. When instead of timeSpent I've tried elapsedTime it also worked properly.
Anyone can help, where am I doing a mistake? Or maybe it's not possible to update the timeSpent from scriptRunner?