Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Does Jira allow to update "state" field of Sprint using REST API ?

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

1 answer

0 votes

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"}

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.

Yes, the state is ok to set. Still it is not allowing it.

 

Whether the state is read-only in Jira ????

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.

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

📹 Favorite Trello templates

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. In this video, I'll share my favorite Trello templates. Templates mentioned in ...

73 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you