How to set SLA time format

Sathish kumar March 23, 2018

How to set SLA time format like this Date + HH:MM:SS..?

 

Is there any option to do this setting in service desk OR in Jira.

 

2 answers

0 votes
Shradha Singh August 1, 2019

Hi,

My requirement is to show Time to resolution > remaining time in date format rather than Hours or days or week.

This will be used as a 'Due Date' in my reports.

Can anybody please suggest, is there any field in SLA fields which can be used for the purpose.

If I use REST call http://<JIRA URL>/rest/servicedeskapi/request/<JIRAISSUEKEY>/sla 

then is there any field in the response which can be used for the purpose.

 

{
"size": 4,
"start": 0,
"limit": 50,
"isLastPage": true,
"_links": {
"base": "http://<JIRA-URL>",
"context": "",
"self": "http://<JIRA-URL>/rest/servicedeskapi/request/JIRAISSUEKEY-114/sla"
},
"values": [
{
"id": "12",
"name": "Time to approve normal change",
"_links": {
"self": "http://<JIRA-URL>/rest/servicedeskapi/request/JIRAISSUEKEY-114/sla/12"
},
"completedCycles": []
},
{
"id": "11",
"name": "Time to close after resolution",
"_links": {
"self": "http://<JIRA-URL>/rest/servicedeskapi/request/JIRAISSUEKEY-114/sla/11"
},
"completedCycles": [
{
"startTime": {
"iso8601": "2019-07-17T00:56:10-0700",
"jira": "2019-07-17T00:56:10.000-0700",
"friendly": "17/Jul/19 12:56 AM",
"epochMillis": 1563350170000
},
"stopTime": {
"iso8601": "2019-07-24T00:56:10-0700",
"jira": "2019-07-24T00:56:10.000-0700",
"friendly": "24/Jul/19 12:56 AM",
"epochMillis": 1563954970000
},
"breached": false,
"goalDuration": {
"millis": 144000000,
"friendly": "40h"
},
"elapsedTime": {
"millis": 144000000,
"friendly": "40h"
},
"remainingTime": {
"millis": 0,
"friendly": "0m"
}
}
]
},
{
"id": "10",
"name": "Time to first response",
"_links": {
"self": "http://<JIRA-URL>/rest/servicedeskapi/request/JIRAISSUEKEY-114/sla/10"
},
"completedCycles": [
{
"startTime": {
"iso8601": "2019-07-03T18:11:07-0700",
"jira": "2019-07-03T18:11:07.273-0700",
"friendly": "03/Jul/19 6:11 PM",
"epochMillis": 1562202667273
},
"stopTime": {
"iso8601": "2019-07-17T00:56:10-0700",
"jira": "2019-07-17T00:56:10.000-0700",
"friendly": "17/Jul/19 12:56 AM",
"epochMillis": 1563350170000
},
"breached": true,
"goalDuration": {
"millis": 14400000,
"friendly": "4h"
},
"elapsedTime": {
"millis": 275170000,
"friendly": "76h 26m"
},
"remainingTime": {
"millis": -260770000,
"friendly": "-72h 26m"
}
}
]
},
{
"id": "9",
"name": "Time to resolution",
"_links": {
"self": "http://<JIRA-URL>/rest/servicedeskapi/request/JIRAISSUEKEY-114/sla/9"
},
"completedCycles": [
{
"startTime": {
"iso8601": "2019-07-03T18:11:07-0700",
"jira": "2019-07-03T18:11:07.273-0700",
"friendly": "03/Jul/19 6:11 PM",
"epochMillis": 1562202667273
},
"stopTime": {
"iso8601": "2019-07-17T00:56:10-0700",
"jira": "2019-07-17T00:56:10.000-0700",
"friendly": "17/Jul/19 12:56 AM",
"epochMillis": 1563350170000
},
"breached": true,
"goalDuration": {
"millis": 201600000,
"friendly": "56h"
},
"elapsedTime": {
"millis": 275170000,
"friendly": "76h 26m"
},
"remainingTime": {
"millis": -73570000,
"friendly": "-20h 26m"
}
}
]
}
]
}

0 votes
Julien Rey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hi @Sathish kumar, can you clarify what you mean by "Date + HH:MM:SS" for the SLA time format?

The SLA displayed in a Service Desk ticket is meant to show the remaining time because the ticket SLA breaches. There are currently 2 types of format that can be used to display the SLA.

  • The new SLA rendering (released with Service Desk 3.6) that shows the number of Months, Weeks, Days, Hours and minutes and only displays 2 units at a time, as explained in https://confluence.atlassian.com/servicedeskserver036/how-teams-see-slas-946616736.html/
  • The old SLA rendering that displays the number of Hours and minutes. To switch back to the old SLA rendering (if you are using SD 3.6.x and higher), you can go to <JIRA_BASE_URL>/secure/SiteDarkFeatures!default.jspa, and click on the disable button next to "sd.sla.improved.rendering.enabled"

Below is an example of the same ticket with SLAs displayed using:

  • the new rendering

SLA_NewRendering.png

  • the old rendering

SLA_OldRendering.png

Sathish kumar March 27, 2018

Thanks for sharing the information..!!

Expectation is to check whether SLA can displays -15h 38m 12S... as well in SLAs Section.

But from the article what you have shared it shows it will not display.

Julien Rey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

@Sathish kumar thank you for the clarification. Then I'm afraid that it is not possible to include the second unit in the remaining time with Service Desk's built-in feature.

If it is required for your use case, when I would suggest taking a look at this 3rd party add-on since according to the documentation, it seems to be possible to include seconds as a unit.

Anders Grape December 21, 2018

Does this new SLa standard only apply to Jira Server ?

We use Jira Servicedesk Cloud version and still have the old SLA format.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events