Hi,
I'm using the Web Request component in Jira Automation to return a list of sprints for a specified board. I want to find the future sprint with the closest date to now.
The Web Request url is https://{{instance}}.atlassian.net/rest/agile/1.0/board/{{boardId}}/sprint?state=future
The Web Request returns the following body:
{
"maxResults": 50,
"startAt": 0,
"isLast": true,
"values": [
{
"id": 2,
"self": "https://[instance].atlassian.net/rest/agile/1.0/sprint/2",
"state": "future",
"name": "Sprint 2",
"startDate": "2023-10-26T11:00:00.000Z",
"endDate": "2023-11-02T11:00:00.000Z",
"createdDate": "2023-10-02T23:14:15.261Z",
"originBoardId": 1
},
{
"id": 3,
"self": "https://[instance].atlassian.net/rest/agile/1.0/sprint/3",
"state": "future",
"name": "Sprint 3",
"startDate": "2023-11-02T11:00:00.000Z",
"endDate": "2023-11-09T11:00:00.000Z",
"createdDate": "2023-10-02T23:14:19.908Z",
"originBoardId": 1
}
]
}
Note: the sprint id and name values above have been simulated. It won't be possible to determine the next sprint from the id or name, so startDate would need to be used.
I'd like to get the id of the sprint with the earliest future start date. If I first try to get the earliest date using the smart value {{webResponse.body.values.startDate.min}} it returns an empty string/value. {{webResponse.body.values.startDate}} returns the 2 start dates as text values. I think the problem is that the smart value doesn't recognize the date in the format returned by the Web Request so it can't use the min/max functions. I have tried converting the date text values to the Jira default format using {{webResponse.body.values.startDate.left(21).concat("+0000")}} but this still won't return a min/max.
Any ideas on how I can get the earliest sprint start date from this web response?
Your proxy says
/ http://domain.com:8081So that should make it available on
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Change what? The url you are using in the browser, yes. Not the proxy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is ok now, but i have a new problem of dashbord display ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You've missed the instructions about amending the server.xml in the docs. See https://confluence.atlassian.com/adminjiraserver071/integrating-jira-with-apache-using-ssl-802593043.html
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.