I'm trying to create an automation that automatically assigns a fix version when a sprint is added to the ticket.
This works fine until a ticket gets too many completed sprints.
I have used this smart name to get the sprint name: {{issue.customfield_10113.last.name}}
When a ticket gets many completed sprints, they are sorted in a strange order, and I cannot find a way to change the sort order. (see order at the end).
The closest I get to grab the correct sprint is with this tag: {{issue.customfield_10113.id.max}}
But this of course only returns the id number, and I need the name.
Any help is greatly appreciated!
Here is the sprint order of one of the tickets. Grabbed from the api.
"customfield_10113": [
{
"id": 64,
"name": "LSCM Sprint W26",
"state": "closed",
"boardId": 22,
"goal": "",
"startDate": "2022-05-09T18:57:10.686Z",
"endDate": "2022-05-10T18:48:00.000Z",
"completeDate": "2022-05-09T18:57:27.036Z"
},
{
"id": 65,
"name": "LSCM Sprint W27",
"state": "future",
"boardId": 22
},
{
"id": 59,
"name": "LSCM Sprint W21",
"state": "closed",
"boardId": 22,
"goal": "",
"startDate": "2022-05-08T21:01:29.004Z",
"endDate": "2022-05-13T21:00:00.000Z",
"completeDate": "2022-05-08T21:02:28.391Z"
},
{
"id": 60,
"name": "LSCM Sprint W22",
"state": "closed",
"boardId": 22,
"goal": "",
"startDate": "2022-05-08T21:09:36.063Z",
"endDate": "2022-05-09T21:00:00.000Z",
"completeDate": "2022-05-08T21:09:48.775Z"
},
{
"id": 61,
"name": "LSCM Sprint W23",
"state": "closed",
"boardId": 22,
"goal": "",
"startDate": "2022-05-09T16:41:18.879Z",
"endDate": "2022-05-10T16:32:00.000Z",
"completeDate": "2022-05-09T16:41:37.706Z"
},
{
"id": 62,
"name": "LSCM Sprint W24",
"state": "closed",
"boardId": 22,
"goal": "",
"startDate": "2022-05-09T16:43:08.226Z",
"endDate": "2022-05-10T16:34:00.000Z",
"completeDate": "2022-05-09T16:43:45.034Z"
},
{
"id": 63,
"name": "LSCM Sprint W25",
"state": "closed",
"boardId": 22,
"goal": "",
"startDate": "2022-05-09T17:22:43.296Z",
"endDate": "2022-05-10T17:13:00.000Z",
"completeDate": "2022-05-09T17:54:23.926Z"
}
],