Where to find variable "breached"

Hi,

I am using rest api 3 as in https://developer.atlassian.com/cloud/jira/platform/rest/v3/

I have a need to get sla for each ticket so I believe the “breached” under customfield_10099 meets the need.

However, a few tickets, around 3% in 30000+ tickets that I have, do not have that variable:

Can anyone advise why or point me to the correct documentation? Thank you.

Compared to what I expect:

“customfield_10099”: {
“id”: “6”,
“name”: “Time to first response”,
“_links”: {
“self”: “https://iherbglobal.atlassian.net/rest/servicedeskapi/request/201399/sla/6
},
“completedCycles”: [
{
“startTime”: {
“iso8601”: “2020-04-02T23:35:38-0700”,
“jira”: “2020-04-02T23:35:38.542-0700”,
“friendly”: “Thursday 11:35 PM”,
“epochMillis”: 1585895738542
},
“stopTime”: {
“iso8601”: “2020-04-03T16:40:11-0700”,
“jira”: “2020-04-03T16:40:11.354-0700”,
“friendly”: “Friday 4:40 PM”,
“epochMillis”: 1585957211354
},
“breached”: true,
“goalDuration”: {
“millis”: 28800000,
“friendly”: “8h”
},
“elapsedTime”: {
“millis”: 34811354,
“friendly”: “9h 40m”
},
“remainingTime”: {
“millis”: -6011354,
“friendly”: “-1h 40m”
}
}
]

According to the API documentation for Jira Service Desk, an issue may have zero SLAs attached to it, which would lead to you seeing zero completed cycles as in that screenshot.

Does AS-33376 have any SLAs attached to it? What state were they in when you took that screenshot?

@huw Thank you for response. This is what I got:

{
“size”: 4,
“start”: 0,
“limit”: 50,
“isLastPage”: true,
“_links”: {
“self”: “h ttps://iherbglobal.atlassian.net/rest/servicedeskapi/request/AS-33376/sla”,
“base”: “h ttps://iherbglobal.atlassian.net”,
“context”: “”
},
“values”: [
{
“id”: “8”,
“name”: “Time to approve normal change”,
“_links”: {
“self”: “https://iherbglobal.atlassian.net/rest/servicedeskapi/request/AS-33376/sla/8
},
“completedCycles”:
},
{
“id”: “7”,
“name”: “Time to close after resolution”,
“_links”: {
“self”: “h ttps://iherbglobal.atlassian.net/rest/servicedeskapi/request/AS-33376/sla/7”
},
“completedCycles”: ,
“ongoingCycle”: {
“startTime”: {
“iso8601”: “2020-04-03T20:33:42-0700”,
“jira”: “2020-04-03T20:33:42.282-0700”,
“friendly”: “Friday 8:33 PM”,
“epochMillis”: 1585971222282
},
“breachTime”: {
“iso8601”: “2020-04-06T07:00:00-0700”,
“jira”: “2020-04-06T07:00:00.000-0700”,
“friendly”: “Monday 7:00 AM”,
“epochMillis”: 1586181600000
},
“breached”: true,
“paused”: false,
“withinCalendarHours”: false,
“goalDuration”: {
“millis”: 28800000,
“friendly”: “8h”
},
“elapsedTime”: {
“millis”: 108000000,
“friendly”: “30h”
},
“remainingTime”: {
“millis”: -79200000,
“friendly”: “-22h”
}
}
},
{
“id”: “6”,
“name”: “Time to first response”,
“_links”: {
“self”: “https://iherbglobal.atlassian.net/rest/servicedeskapi/request/AS-33376/sla/6
},
“completedCycles”:
},
{
“id”: “5”,
“name”: “Time to resolution”,
“_links”: {
“self”: “h ttps://iherbglobal.atlassian.net/rest/servicedeskapi/request/AS-33376/sla/5”
},
“completedCycles”:
}
]
}
p.s. I added space in “http” just to be able to post the reply.

As you can see, the “Time to first response” section does not have any cycle. I can get the date of creation 2020-04-02 22:25:41 and date of first response 2020-04-02 22:43:44, so I am not sure why this ticket does not calculate time to first response.

Besides, what does cycle mean? Why would it be possible for it to not exist?

What does the ticket say when you open it in Jira’s UI? Then we should be able to tell whether this is a faulty ticket or a problem with the API