I am creating multiple sprints (like 20 sprints) in one run using rest api . I can see that the id of the sprints were created sequentially like 100, 101, 102, 103 etc. But when i look into the board, they are not in order. For eg Sprint ID 102, Sprint ID 101, Sprint ID 103, Sprint ID 100 etc. I tried using the /rest/agile/1.0/sprint/{sprintId}/swap api, but irrespective of the number of ways i tried, reordering them in 100, 101, 102, 103.. is not happening. Using the swap api does do something, but i never understood what exactly it does. Appreciate your help in explaining if the swap api (/rest/agile/1.0/sprint/{sprintId}/swap) will work and if yes, how to make it work? And if not, then any alternative?
Could you expand on what you expect from the "swap api", specifically what you expect it to do differently to the documentation?
What is see today when i open the board -
Sprint 102
Sprint 101
Sprint 103
Sprint 100 etc.
What i expect to see is
Sprint 100
Sprint 101
Sprint 102
Sprint 103 ...
i.e. i want to see the sprints in sequence.
Code i am using is
1) for Sprint 100 -
posturl = <myurl> + '/rest/agile/1.0/sprint/<Sprint 100 id>/swap'
and Body -
swapData = {
"sprintToSwapWith": 1
}
2) for Sprint 101 -
posturl = <myurl> + '/rest/agile/1.0/sprint/<Sprint 101 id>/swap'
and Body -
swapData = {
"sprintToSwapWith": 2
}
3) for Sprint 102 -
posturl = <myurl> + '/rest/agile/1.0/sprint/<Sprint 102 id>/swap'
and Body -
swapData = {
"sprintToSwapWith": 3
}
4) for Sprint 103 -
posturl = <myurl> + '/rest/agile/1.0/sprint/<Sprint 103 id>/swap'
and Body -
swapData = {
"sprintToSwapWith": 4
}
... and so on.
Am i doing something wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are the IDs of the sprints you are trying to swap?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The sprint ids are like 1050, 1051, 1052, 2053 etc. and the names are Sprint 100, Sprint 101, Sprint 102, Sprint 103 etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, and are you using those id's when using "sprintToSwapWith", and not 1, 2, 3, 4 etc?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, i tried that already, using ids and then I used sequences also, and it was not behaving correctly .. it was generating some wired sequencing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, when I try this, I have my sprints re-order ok when I issue the calls to rearrange them.
What error messages are you getting?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nic Brough -Adaptavist- , Its working. Thanks a lot. There was no error message at all even in my first trial. Just that the result sequencing was illogical it seemed at first. But playing with it a bit longer did give the expected result. Thanks again!
To explain the problem that i was facing - its just how jira creates 'id' of a sprint. It took me some time to understand that. The ids are not always generated in sequence. For eg if Sprint 100 was created with 'id' of 1001, Sprint 2 can have 'id' of 1002 or even 990. Seems internal logic of Jira to assign ids.
But now its good. Thanks for all your help!
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.