iceScrum Forums Discuss on iceScrum
- This topic has 7 replies, 4 voices, and was last updated 9 years, 5 months ago by Vincent Barrier.
-
AuthorPosts
-
12/05/2015 at 9:12 pm #10715
KagilumKeymasterI am trying to update the startDate for my project. It somehow ended up one month ahead of the activation date and we would like to “close” the sprint on the actual date for record keeping purposes.
I am using this command with the REST API:
curl -X -H “Accept: application/json” -u user:pwd –request PUT -d “sprint.startDate=05072015” –verbose http://icescrum.example.com/icescrum/ws/p/INFRA/sprint/1106
and I keep getting this error:
{“notice”:{“text”:”Cannot get property ‘version’ on null object”}}
I have tried formatting the dates with slashes (MM/dd/yyyy) and datetime format (2015-05-06T00:00:00Z) and I still get this error.
Attached is a full stack trace. Can you help us set the date to what it should be (04/29/2015? We have the ability to update the database as well.
13/05/2015 at 8:24 am #11086
Nicolas NoulletKeymasterThere are two different problems here:
– Updating dates for record keeping purposes
I am sorry but I did not understand your issue. I am not an English native speaker so this may affect my understanding. Could you please rephrase it by providing the current state of the dates and the state you want to reach?
Please note that using the API will not work around business rules enforced in the GUI so if you cannot update a date in the GUI then you will not be able to do so through the API. The only way to bypass the business rules consists in updating the database records manually but this should be avoided as much as possible in order to prevent inconsistencies, instabilities, data loss…
– Updating the sprint start date through the API
The problem here is that you provide a body of Content-Type “application/x-www-form-urlencoded”. The API only accepts JSON and XML formats as output and input. That means that if you provide a body with the request then it must be either in JSON or XML, as explained in the documentation: https://www.icescrum.com/documentation/icescrum-api/#summary_6.
Regarding the date format, as explained in the documentation: https://www.icescrum.com/documentation/icescrum-api/sprint-api/, if your user uses the EN-US locale then the format is MM/dd/yyyy.
Here is an example of cURL command that is more likely to succeed:
curl -X PUT -H "Content-Type: application/json" -u user:pwd -d '{ "sprint": {"startDate": "04/29/2015"} }' http://icescrum.example.com/icescrum/ws/p/INFRA/sprint/1106
13/05/2015 at 9:20 pm #11087
KagilumKeymasterNicolas,
Thank you for updating my curl command.As you mentioned, since the GUI will not let us update the startDate once the sprint has been activated, neither will the API.
Any suggestions for how to fix the original problem? Below is a reworded description:
We have a project that was setup and activated on 04/29/2015. The startDate somehow ended up being set to 05/30/2015 rather than the ideal 04/30/2015. Due to this problem, we cannot close the sprint because the endDate is before the startDate.
Can you point us to the database tables we would need to update? Otherwise we will not be able to close this sprint and start a new one until 06/15/2015.
18/05/2015 at 8:16 am #11089
Nicolas NoulletKeymasterFirst, it is important to understand the model, which is designed in an object oriented fashion. Sprints and releases are represented by the classes Sprint and Release, which both inherit from an abstract class named Timebox, which gives them the startDate and endDate attributes.
In the DB, the Sprint class is represented as the icescrum2_sprint table, the Release class is represented as the icescrum2_release table and the Timebox abstract class is represented as the icescrum2_timebox table.
That means that for every sprint and every release, there is a row in there respective table and another row with the same id in the icescrum2_timebox table that stores its startDate and endDate under the start_date and end_date columns.
First, stop iceScrum and make a DB backup. Then, you will need to update the icescrum2_timebox table for the sprint. I recommend that you also check that the release startDate is correct (a sprint cannot start before the first day of the release). Finally, start iceScrum.
22/05/2015 at 1:31 pm #11090
KagilumKeymasterNicolas,
We tried your solution yesterday and it worked! Thank you so much!22/05/2015 at 2:00 pm #11091
Nicolas NoulletKeymasterGlad to know that it worked! 🙂
01/07/2015 at 8:48 am #14717
rajkumar.teckraft@lodhagroup.comParticipantHi I would like to create a Task using REST API on my local instance but I am not able to use the curl command with REST API,
Can You Please Tell me the way how can I Use this …
02/07/2015 at 10:21 am #14733
Vincent BarrierKeymasterHey,
Please don’t post on each topic. -_-‘
Follow the documentation about REST API and it should be ok. REST API
-
AuthorPosts
The forum ‘Questions and help’ is closed to new topics and replies.