We were trying to update the "state" filed of Jira Sprint using API.
We are not able to update it, we are getting the below error.
OH-JIRA-0222: An internal error occurred when getting the issue information. Server Error : 500 , response from server is : <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>Unrecognized field "state" (Class com.atlassian.greenhopper.api.rest.bean.SprintCreateBean), not marked as ignorable at [Source: org.apache.catalina.connector.CoyoteInputStream@6bd864a2; line: 1, column: 1075] (through reference chain: com.atlassian.greenhopper.api.rest.bean.SprintCreateBean["state"])</message><stack-trace>org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "state" (Class com.atlassian.greenhopper.api.rest.bean.SprintCreateBean), not marked as ignorable at [Source: org.apache.catalina.connector.CoyoteInputStream@6bd864a2; line: 1, column: 1075] (through reference chain: com.atlassian.greenhopper.api.rest.bean.SprintCreateBean["state"]) at
I suspect you've tried to do this as though state is an issue field. It is not, it is a sprint property.
You can only make some changes to state of a sprint, the ones the UI allows you to do. See the REST API at https://docs.atlassian.com/jira-software/REST/7.3.1/#agile/1.0/sprint-updateSprint
We were trying to update the state of Sprint where the state is property of Sprint Entity.
API: http://10.13.27.105:8080/rest/agile/1.0/sprint/74851
Request Body :
{"name":"Sprint testing"endDate":"2020-12-29T13:18:00.000+0530","startDate":"2020-12-23T13:18:00.000+0530","originBoardId":20,"state":"Active"}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you checked that the state is ok to set? The doc I pointed at shows you some rules about what you can change with the call.
If your call is valid and allowed, then you'll need to look for another cause of the "Internal server error" - the application log should have a block of log that tells you what has gone wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the state is ok to set. Still it is not allowing it.
Whether the state is read-only in Jira ????
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is in some cases, as stated in the doc.
But I'd not expect it to give an internal server error if you try to set the state when it's not allowed, you do need to track that down by reading the application log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not able o find any reason in the logs for such an internal server error. It seems that Jira is not allowing to write/update the state field of the Sprint entity. "State" is working the "read only" for sprint.
Our Jira version: 8.13.1
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.