Hello,
I am currently writing a script in script runner using the REST API.
The feature that i am implementing requires me to change the status of an issue.
Currently, the code looks like this:
def result = put("rest/api/3/issue/<My Issue>/transitions")
.header('Content-Type', 'application/json')
.body([
transition: [
id: '61'
]
])
.asString()
When running the script, i get:
Method Not Allowed
I know that ID 61 is for me a valid status.
Any idea on what could be the problem?
Thank you and have a nice day!
Using post instead of put worked and changed the status. However i did not understand why?
As far as i know, put updates and post adds new entries. Here i am only interested in updating the issue
After reading more, i understood that what i knew was completely wrong. I now understand why i have to use POST and not PUT.
Thanks and have a nice day!
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.