Hi,
I am currently using the v2 schedules endpoint to extract the timeline for each schedule. I am facing an issue when the type is default it returns two objects in the finalTimeline>rotations>periods array.
Basically if the current rotation falls within the current date (or the date you call the endpoint) it returns a 'historical' type object for the original start date which is the correct date and the end date is the current date/time. Then it also includes a 'default' type object of the same rotation with a start date of the current date/time and a correct end date of the original schedule end date? This, I find rather frustrating when trying to collect store and update this data in our SQL database for analytics as I cannot seem to find any form of index to compare against for updates.
So for my two questions, can we somehow return a unique id for the items inside the periods array, or can we call the endpoint to return the rotation periods without the current date/time part and just return the actual original start and end dates as they would appear if the rotation period had totally elapsed?
I hope this all makes sense and thanks for your help in advance.
Hi Mark,
Thank you for reaching out to Atlassian support. I understand you would like to see the start and end date of a rotation in the same object.
When rotation is split between two dates, the historical type will show the current date as the end date, and the default type will have the actual end date. In this case, you can use the user ID as the unique ID in your script, and when the historical type is present for the user ID, You can fetch the end date from the default type.
However, I understand that this can be confusing at times. To make it better in future, I have created a Feature request, OPSGENIE-1925, with your suggestions. You can add yourself as a watcher to keep track of it and to receive notifications for updates.
Thank you,
Tejaswi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.